DEV Community

[Comment from a deleted post]
Collapse
 
mvoloskov profile image
Miloslav 🏳️‍🌈 🦋 Voloskov

What's your opinion on Redux vs useReducer + optional useContext in different situations?

Collapse
 
cenacr007_harsh profile image
KUMAR HARSH

It's all new for me, so I don't think I can say much about them right now.

Collapse
 
shyam2794 profile image
shyam • Edited

Redux
It is best suited if your app is huge and you have many components which might need to access the store .

Context
redux will be an overkill if you have a small app where you want to pass data say for 2 level nested components . In this case use Context API which is much more simpler.

useReducer
when you have a component state which gets updated on different actions for example add row, delete row , update row etc . So that it is clear which action is causing the state update .