Supervised Emitter vs Redux - AkashBabu/supervised-emitter GitHub Wiki
For those who are keen on knowing the major differences between this library and redux
First and foremost important thing to note is that this library does NO STATE MANAGEMENT, but gives you the possibility to do so.
So the below comparison is mostly with reducers.
- Boilerplate for using redux in react is huge and also the injection mechanism is inevitable, but SE doesn't need any of it (even for code splitting!!).
- In Redux, there is a risk of a wrong reducer modifying the state, whereas this library provides a
scopeoption which will eliminate such risks. - Redux need to be connect to all the component participating in the communication which inturn needs a lots of boilerplate (more JS mean slower response and more bugs), where SE needs minimal code which makes it ideal to be used even in dumb components.
- Everytime a new reducer is injected, the only way to make that happen is by rebuilding the composed function, but SE makes it relatively easy by just appending an item to DLL list (used internally).
- In redux, none of the reducer can stop the flow of data, but SE provide the capability to do so.
- In redux, every action will have to go through all the reducers irrespective of whether the reducer is really interested in that action or not, but SE target specific handlers.