4 ms·
> Isn't this just how the DOM works? Data flows down through attributes and properties; events bubble up? That's right, but this communication pattern causes s
by picardo 11mo ago
> Isn't this just how the DOM works? Data flows down through attributes and properties; events bubble up?
That's right, but this communication pattern causes serious complexity. Imagine trying to find out what triggered a state change. You would have to listen to every event source to find out. With Flux, all state changes were mediated by the reducer in the store. It made things a lot simpler.
- aatd86 11mo agoShouldn't a state change should be purely event driven, and not dispatch its own events as side effect? That avoids reetrancy and is an easy rule to adopt...? Or am I misunderstanding the issue?
- picardo 11mo agoYou're right about that, but that wasn't common practice at the time. We learned about side-effects from Elm and Flux.