3 ms·
I've been using Redux, and it is pretty much required if you have multiple components who need to update when a single state changes.... but pretty unhappy a
by novaleaf 11y ago
I've been using Redux, and it is pretty much required if you have multiple components who need to update when a single state changes.... but pretty unhappy as the amount of scafolding required. It's not nearly as "isolated concerns" as it should be.
- alias240 11y agoTake a look at MobX. It's a different paradigm that requires very little boilerplate and results in more isolated components that react independently upon changes to state. https://github.com/mobxjs/mobx https://github.com/mobxjs/mobx
- true_religion 11y agoRight. I can give two alternatives. 1. Elm. I was just about to throw away the idea of Flux in a web app till I saw TodoMVC implemented in Elm. In Elm everything is immutable, and as a functional language, it has a lot of helpful syntax to help you deal with immutability. Shoehorning immutability into Javascript seems to require a lot of scaffolding by comparison. 2. MobX, it's been mentioned elsewhere but I can't help but sing its praises. Writing in MobX means that using controllers/dispatchers/actions/supervisors or another form of managing dataflow returns to being an architectural concern you can pattern to your application's needs, rather than being something that's required by default for anything more than a Todo app.