4 ms·
Eh, as maintainer, I'd say the complaints about "boilerplate" were generally pretty accurate :) As I've talked about in a couple posts and presentations [0] [1
by acemarke 4y ago
Eh, as maintainer, I'd say the complaints about "boilerplate" were generally pretty accurate :)
As I've talked about in a couple posts and presentations [0] [1], there's a distinction between "inherent" and "incidental" complexity. Dispatching actions and using reducers is "inherent" - it's part of Redux, and you can't remove that because then it's not Redux. But things like writing `const ADD_TODO = "ADD_TODO"`, object spreads, etc, aren't _necessary_ for using Redux - they're inherent complexity.
Which is why we wrote Redux Toolkit to fix all that incidental complexity :)
Redux still won't ever be as few lines of code as various other libs, but writing Redux code today is much simpler than it was previously... and yes, the _benefits_ of Redux (predictable code, debugging, separation of state updates, middleware) are still entirely valuable.
[0] https://blog.isquaredsoftware.com/2022/06/presentations-modern-redux-rtk/ https://blog.isquaredsoftware.com/2022/06/presentations-mode...
[1] https://blog.isquaredsoftware.com/2019/10/redux-toolkit-1.0/ https://blog.isquaredsoftware.com/2019/10/redux-toolkit-1.0/