5 ms·
KnockoutJS (KO) does essentially the same thing: What KO calls observable, Reactor calls signal. What KO calls computed, Reactor calls observer. The ReactiveE
by judah 13y ago
KnockoutJS (KO) does essentially the same thing:
What KO calls observable, Reactor calls signal.
What KO calls computed, Reactor calls observer.
The ReactiveExtensions library (including Rx.js) has been doing this thing for several years now, only more sophisticated than either KO or Reactor: https://github.com/Reactive-Extensions/RxJS https://github.com/Reactive-Extensions/RxJS
- fynyky 13y agoYep. This is an attempt to do what knockout does in a simpler form with less syntax
- judah 13y agoInteresting. Where does the less syntax come in? I'm looking at your signal and observer, and it looks like the same syntax as KO.
- fynyky 13y agoOne difference is that there is no need to explicitly subscribe to signals. For general functions, knockout requires manually declaring "myViewModel.property.subscribe(...)" for each model you need to subscribe to. In contrast, Reactor's observer blocks automatically detect which signals you have read and sets up the subscriptions automatically. Knockout has a different class for ko.computed vs ko.observable. For Reactor you use "Signal" for both and just pass in a function when its computed. Additionally there is no need for the trailing "this" at the end of ko.computed.
- dustingetz 13y agoknockout is not FRP. Knockout uses single events, FRP uses event streams. Here's a quote from Knockout's creator. http://stackoverflow.com/questions/5101113/whats-the-difference-between-knockout-js-and-rx-js http://stackoverflow.com/questions/5101113/whats-the-differe...