Nir Alfasi
Oct 21, 2022

--

AFAIK useContext is not a good substitute of redux in _all_ cases: useContext is a good solution to store user state (which rarely changes) but when you store items that change frequently you'll see a performance hit because it rerenders all the components whenever there's a change in the provider's value prop so you should probably use redux in such cases (or an alternative solution).

--

--

Nir Alfasi
Nir Alfasi

Written by Nir Alfasi

“Java is to JavaScript what Car is to Carpet.” - Chris Heilmann

Responses (1)