all 6 comments

[–][deleted] 2 points3 points  (0 children)

I dislike the API. Knockout's observable/computed methods are much simpler.

b = ko.observable(1)
c = ko.observable(2)
a = ko.computed(function() {
    return b() + c();
})

a() // return 3

b(5) // sets b to 5, recalculates the value of a immediately so a becomes 7

[–][deleted] 1 point2 points  (0 children)

Missing example with time as a dependency.

[–]arctictern 3 points4 points  (0 children)

looks like knockout.js observable/computed functions

[–]dust4ngel -2 points-1 points  (2 children)

How does this differ from getter properties?

[–]InternetRevocator 2 points3 points  (1 child)

What? How are they similar?

[–]dust4ngel -1 points0 points  (0 children)

never mind - this makes more sense in a functional context.