News for hackers. Stuff that matters.
Re:Reactor.js: simple reactive programming for Javascript by fynyky on Thursday May 16, 2013 @02:26PM (#5720170)
Yep. This is an attempt to do what knockout does in a simpler form with less syntax
Re:Reactor.js: simple reactive programming for Javascript by judah on Thursday May 16, 2013 @02:52PM (#5720373)
Interesting.

Where does the less syntax come in? I'm looking at your signal and observer, and it looks like the same syntax as KO.

Re:Reactor.js: simple reactive programming for Javascript by fynyky on Thursday May 16, 2013 @03:22PM (#5720556)
One 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.