25 ms·
For managing side effects, redux-saga[0] is god-send if you are using redux. [0]: https://github.com/yelouafi/redux-saga https://github.com/yelouafi/redux-saga
by hakanderyal 10y ago
For managing side effects, redux-saga[0] is god-send if you are using redux.
[0]: https://github.com/yelouafi/redux-saga https://github.com/yelouafi/redux-saga
- eiriklv 10y agoThe idea behind redux-saga, to push all effects to the edge (handled by a runtime), only handling descriptions of the actual effects doesn't have to be limited to redux/redux-saga either. You can leverage generators + a runtime to build all kinds of applications like this [0] (you can sort of do this without generators too, but it's a bit more quirky when you cannot control/pause the execution [1]). Easy testing (no more mocks/stubs in the traditional sense - only data/descriptions) and predictability are just some of the benefits. [0]: https://gist.github.com/eiriklv/a498112b3a73fc2b92975649924cf5c3 https://gist.github.com/eiriklv/a498112b3a73fc2b92975649924c... [1]: https://gist.github.com/eiriklv/b6cc681447a0939365e1ba044fac15d7 https://gist.github.com/eiriklv/b6cc681447a0939365e1ba044fac...