by untog · 7y ago · 0 comments
Some apps are complex enough that they need this. In my experience, a lot of Redux apps really aren’t all that complicated, and people have used Redux because it’s The Thing To Do.
You start reaping the benefits when you need a state machine to manage complexity of your application. Thus, to demonstrate Redux's usefulness you need sufficiently complex examples.
That said, the explanation is as easy as saying Redux enables your frontend to be a state machine.
Reducers are very useful and simple to understand, and are great even on smaller apps. It's possible to see that in things like useReducer.
IMO the problem with Redux is that you "need" all the boilerplate around it. I say "need" in quotes because you can easily get around it and not lose much (if anything). And if you do, you start to reap the benefits even in very small apps.
https://redux-starter-kit.js.org/tutorials/advanced-tutorial