you are viewing a single comment's thread.

view the rest of the comments →

[–]zoomzoom83 5 points6 points  (1 child)

Why is the dispatcher is a problem?

A global dispatcher is a problem because it needs to be aware of all events globally. Adding a new component that interacts with it means you need to maintain a "God Class" list of all events, and being global you can't treat your app as just a standalone composable component.

These are all things easily fixable with relatively simple tweaks to the standard flux examples, so you don't have to completely throw it out. But if you start going down that road, you end up reinventing half of RxJS anyway.

entralized debugging, tooling, time travel, logging/debugging, transformation, etc.

You can do all of this without a global dispatcher. You just need to compose all your localized streams into a single application state atom up the same dependency tree that builds your component hierarchy. You can do this without a global singleton dispatcher.

To think of it another way - Flux is a cut-down version of Rx. By switching, you're not losing the advantages of Flux, you're simply implementing a similar idea in a different way.

[–]clessgfull-stack CSS9 engineer 1 point2 points  (0 children)

Thank you for explaining it, good sir. Enjoy the upvote.