by harrisonhope on 5/29/20, 2:36 AM with 23 comments
by cercatrova on 5/29/20, 7:52 AM
by acemarke on 5/29/20, 3:18 PM
The biggest issue is that it goes directly against the principles I listed in the Redux Style Guide [0], particularly:
- put as much logic as possible in reducers [1]
- reducers should own the state shape [2]
- model actions as "events", not "setters" [3]
Also, Dan pointed out early on in Redux's development that "cursor"-style approaches to state updates are not how he intended people to use Redux [4].
Will it run? Sure. Is it something I'd actually recommend? Definitely not, and especially given the existence of our official Redux Toolkit package [5] and the React-Redux hooks API [6].
[0] https://redux.js.org/style-guide/style-guide
[1] https://redux.js.org/style-guide/style-guide#put-as-much-log...
[2] https://redux.js.org/style-guide/style-guide#reducers-should...
[3] https://redux.js.org/style-guide/style-guide#model-actions-a...
[4] https://github.com/reactjs/redux/issues/155#issuecomment-113...
by cakerace on 5/29/20, 6:56 AM
by sansnomme on 5/29/20, 5:53 AM
by ipsum2 on 5/29/20, 7:08 AM
by nerdbites on 5/29/20, 7:00 AM