3 ms·
There is some amount of boilerplate with rolling your own, but I think people might benefit from rolling their own flux implementation when they first try to pl
by aggronn 11y ago
There is some amount of boilerplate with rolling your own, but I think people might benefit from rolling their own flux implementation when they first try to play with react. The best solution I think for this is to have multiple dispatches in your actions.
Create action -> action[dispatch 'action pending' -> async action -> dispatch 'action complete with data'] -> stores.
Keep your stores completely sync, and the data in a single object, and maybe have them all be pure functions, and suddenly there is no web of anything and theres a single source of truth, and bam. nice.