DEV Community

Discussion on: Redux vs Context API: When to use them

Collapse
 
nlaitan profile image
nlaitan

Context: Specifically designed for static data, that is not often refreshed or updated.
Redux: Works like a charm with both static and dynamic data.

I've working on a complex project only with context, I didn't see this point. Simply using getters and setters (it's the same thing that use useState) in context do all the work. Integrates very well with hooks and custom hooks and also easy to read.

Can you explain why redux it's better at this point?

Collapse
 
ruppysuppy profile image
Tapajyoti Bose

If you work on a huge project (where you are new to the codebase) with context, you will be running up & down the Dom to find the origin of the data