gaearon / ama

Ask me anything!
222 stars 5 forks source link

When to use redux #136

Open blocka opened 7 years ago

blocka commented 7 years ago

I see that you write a lot on when not to use redux, especially in the context of blindly replacing setState with redux for now apparent gain (ie., glorified setters). Understandably, there is not much added architecturally except for indirect, boilerplate and noise.

Can we say that, even in that case, redux gives us other advantages? For example, time-travel debugging, ecosystem, ability to use tools such as redux-saga for elegantly dealing with side-effects and async programming, in general, clear architectural rules (ie., easier on-boarding), easily serializing state and action log, etc.

It seems there are a lot of advantages in using redux outside a todo app, or calculator, even if the reducers do become "glorified setters".