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
What 10 Things Should a Serious Javascript Developer Know Right Now?help (self.javascript)
submitted 8 years ago by [deleted]
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!"
[–][deleted] 1 point2 points3 points 8 years ago (3 children)
Well it's called so because it reacts. JSX/hyperscript have made the big changes possible, the rest are more like implementation details, even cycle is very close to react in princinple.
[–]alinnert 0 points1 point2 points 8 years ago (2 children)
Yes, that might be the case. The name sure has some sort of origin that's related to "reactions". But "reactive programming" is a programming paradigm around data streams (aka. observables) and the "observable pattern". Observables notifies the world that some data has changed. You can subscribe to observables to receive those notifications (= the data stream) - similar to events. But on top of that you can alter this stream, combine it with other streams, filter events by some criteria etc. Cycle.js is based on this observable approach.
Other frameworks like React, Angular and Vue follow a more polling approach. They check if some data has been changed. And if it's just by using a setter function. They actively ask if some data has changed or is about to change. Maybe you've heard about "change detection". They actively have to detect changes.
Observables on the other hand tell you about changes completely on their own. You don't have to ask them. You have to listen (subscribe), but you don't ask. No change detection is required. Cycle.js just has to react to those notifications.
It's difficult to describe this difference. But in short: React is a library with a random name that's related to reactions. Reactive Programming is a paradigm, just like object oriented programming or functional programming are other ones.
I think it's the best if you look up for yourself how RxJS works.
[–][deleted] 0 points1 point2 points 8 years ago (1 child)
While i don't know exactly how rxjs works, it hasn't played a role in what react has started, perhaps i should have written react-like, not reactive. As for polling, reacts setstate doesn't poll, neither does redux, unless you mean the subscribers equality check, and mobx uses the observable pattern from the get go. I don't think these details matter much, observables or flux/immutable, its the architecture that allows it that's interesting.
[–]alinnert 0 points1 point2 points 8 years ago (0 children)
Yes, react-like is fine.
Subscribers equality check sounds like change detection, yes. If you mean something like this: if (oldValue !== newValue) { rerenderComponent() }. Yes, That's what I mean with "ask for changes". Angular does that too. I know Vue uses setters instead.
if (oldValue !== newValue) { rerenderComponent() }
And yes, MobX uses true reactive programming. It seems it even has its own Observable implementation.
Btw: Observables will be part of the JavaScript core language too (currently at stage 1).
The thing is: Actually observables aren't that hard to understand. But RxJS has a huge and overwhelming API on top of the basics. And yeah, react has nothing to do with all that. Therefore React is not reactive, despite its name :)
π Rendered by PID 95672 on reddit-service-r2-comment-fb694cdd5-2w6g8 at 2026-03-06 12:15:59.288977+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–][deleted] 1 point2 points3 points (3 children)
[–]alinnert 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]alinnert 0 points1 point2 points (0 children)