4 ms·
For me the problem with Redux is not that it’s complicated, it’s that it’s wildly verbose and adds a huge layer of misdirection to an app. Some apps are comple
by untog 7y ago
For me the problem with Redux is not that it’s complicated, it’s that it’s wildly verbose and adds a huge layer of misdirection to an app.
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.
- oijoihodsf 7y agoI think that's the problem with demonstrating Redux, no? 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.
- ratww 7y agoI don't think that's the problem per se. 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.
- shantly 7y agoPart of why I only find React+Redux tolerable with TypeScript. Too much bouncing around, too many files open, otherwise. And that's before you layer any other crap on top of that (Saga and such). TypeScript makes it feel as simple as it actually is.
- acemarke 7y agoNote that Redux Starter Kit is built in TypeScript itself, and `createSlice` makes it easy to write all the logic for a given slice in a single file. Then, combine that with our new React-Redux hooks API, and it really gets easy to work with Redux in your components: https://redux-starter-kit.js.org/tutorials/advanced-tutorial https://redux-starter-kit.js.org/tutorials/advanced-tutorial