Hacker News new | ask | show | jobs
by ng12 3517 days ago
> Is it easy to replace Redux with another state-container or data-storage without updating entire app?

Yes. This is why I use Redux. All the other stuff like reproducibility, state persistence, and devtools are just icing on the cake.

Redux heavily encourages architectures where the vast majority of your app has no knowledge of how data is stored, fetched, or updated. I purposely architect everything so that Redux would be easy to remove -- not that I actually plan on doing it, but it's a good litmus test that my architecture is properly data-agnostic. The end outcome is that the majority of the code is "pure" -- that is reusable, composable, and predictable. It's also immediately obvious which code actually touches state (namely actions, reducers, and containers).