Re:Reactive Programming in JavaScript
by thecolorblue on Wednesday March 19, 2014 @08:51AM
(#7428249)
Ok, I see where there is not getting/setting. Looks very cool.
In angular, there are no setters/getters, you just set values the vanilla way... val = newVal; Angular keeps a reference and a copy of all the watched variables, checks for a change during the 'digest' cycle, and triggers events accordingly. It's not completely for updating the DOM. The syntax for Reactive looks cleaner (I guess ES6 helps a bit).
The set and get methods are there to go from the JS world to the reactive world and back. Usually you're working with reactive variables (as if they were actual values) directly, in that case you won't use get and set at all.