3 ms·
I think this is generally a side effect of people considering actions to be a replacement for the Controller part of MVC. Meaning any sort of logic (including l
by hashamali 7y ago
I think this is generally a side effect of people considering actions to be a replacement for the Controller part of MVC. Meaning any sort of logic (including legitimate state manipulation) is jammed into actions.
Personally, I don't see that as a huge problem. Better in an action than sprinkled into components. As someone else mentioned, redux-thunk makes this even easier (and one could argue, promotes this).
- nohuhu 7y agoAnother way of doing controller stuff is by actually using a Controller: https://github.com/riptano/statium#viewcontroller https://github.com/riptano/statium#viewcontroller. Example: https://github.com/nohuhu/react-statium-realworld-example-app/blob/master/src/components/Register.js#L117 https://github.com/nohuhu/react-statium-realworld-example-ap... Logic flow doesn't have to be hard to do.
- pier25 7y agoYes, I agree on the MVC part. > Better in an action than sprinkled into components Totally.