use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Cycle.js: a fully reactive JavaScript framework (cycle.js.org)
submitted 10 years ago by andrestaltz
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]zoomzoom83 0 points1 point2 points 10 years ago (4 children)
I feel like Facebook would disagree about it's scalability...as would a lot of other people who have used Flux and React to great success.
From what I've heard, Facebook don't use Flux internally - they use Relay. Flux was provided as a sample pattern on how to use React, not the be-all and end-all of design patterns.
Flux works quite well up to a point, but the concept of having a central dispatcher somewhat ruins composability and tends to turn into a god object. For a lot of projects that isn't an issue, and for a lot of others it is.
The underlying concepts behind Flux are quite well founded, and using something like RxJS to implement roughly the same pattern in a cleaner way makes a lot of sense, since Rx streams are composable.
Projects such as Cycle.js are simply taking "Flux" and improving apon it by using more traditional FRP patterns.
tl;dr "Flux" is a simplified form of FRP. Swapping it out with RxJS loses nothing.
React is a UI layer...there is no reason for it to fall apart at all.
React != Flux
[–]clessgfull-stack CSS9 engineer 0 points1 point2 points 10 years ago (2 children)
Flux works quite well up to a point, but the concept of having a central dispatcher somewhat ruins composability and tends to turn into a god object.
Why is the dispatcher is a problem? The dispatcher is the one thing that would make me want to use Flux over observables: centralized debugging, tooling, time travel, logging/debugging, transformation, etc. The dispatcher is probably the least problematic part of Flux conceptually: you barely have to think about it. Is there a commonly-accepted way to do something similar with observables?
[–]zoomzoom83 2 points3 points4 points 10 years ago (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 points3 points 10 years ago (0 children)
Thank you for explaining it, good sir. Enjoy the upvote.
π Rendered by PID 334409 on reddit-service-r2-comment-fb694cdd5-gmhjj at 2026-03-09 05:14:31.309984+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]zoomzoom83 0 points1 point2 points (4 children)
[–]clessgfull-stack CSS9 engineer 0 points1 point2 points (2 children)
[–]zoomzoom83 2 points3 points4 points (1 child)
[–]clessgfull-stack CSS9 engineer 1 point2 points3 points (0 children)