3 ms·
Now you're making me want to implement this with the js-csp library to show it off. But you're exactly right. Redux (imho the best "flux" implementation out th
by jlongster 11y ago
Now you're making me want to implement this with the js-csp library to show it off.
But you're exactly right. Redux (imho the best "flux" implementation out there, quotes because its only partly flux) is not against async abstractions like channels or observables. It just eschews requiring them as the backbone for communication with the UI, and favors a simple naive state change notification. But in action creators, if you need to do complex work, you should absolutely use channels or observables to synchronize stuff, and then dispatch simple actions to make state changes.
I've found it really, really nice to constrain async abstractions into a single place. It makes the rest of the code just normal synchronous stuff (i.e. all the UI code, about 70% of our app), and you can do record/reply simply by just replaying actions.