Reputation:
Is there any difference between dependenant observables and computed observables in KnockoutJS?
My understanding is that computed observables are successors to dependent observables (basically just different name in the newer versions of Knockout) - but some of the tutorials on the web use one and some use the other.
Can someone answer this once and for all?
Upvotes: 3
Views: 602
Reputation: 1024
Same thing, the name was changed in knockout 2.0. Older examples may use the old name.
See: http://knockoutjs.com/documentation/dependentObservables.html
From Knockout's documentation:
At runtime, ko.dependentObservable refers to the same function as ko.computed, so your existing code will continue to work just fine.
Upvotes: 6