3 ms·
There seems to be some big downsides to intermingling side effects in action creators vs immutable state changes in reducers. Reducer logic would then require
by davidjnelson 9y ago
There seems to be some big downsides to intermingling side effects in action creators vs immutable state changes in reducers. Reducer logic would then require complex mocks. Reasoning about side effects and immutable state changes separately feels natural to me. Would love to hear how putting the side effects in the same functions used for immutable state changes makes code _less_ tangled.
- actsasbuffoon 9y agoAnother possibility is using sagas for handling side-effects. I've been happy with that approach. https://github.com/redux-saga/redux-saga https://github.com/redux-saga/redux-saga