I’ve been going over alot of knockout work lately and I’m new to 2.0. I’d seen material on dependent observables and then some stuff on computed observables and thought they were different things! I’d been meaning to google what their differences were when I ran across this on Knockoutjs:
What happened to dependent observables?
Prior to Knockout 2.0, computed observables were known as dependent observables. With version 2.0, we decided to rename
ko.computed because it is easier to explain, say, and type. But don’t worry: this won’t break any existing code. At runtime,
ko.dependentObservable refers to the same function instance as
ko.computed — the two are equivalent.
That makes a lot of sense now! Yay one less thing to have to know. You should check out the API, its pretty useful. I’m going to try and write a small blurb about using a computed observable in a separate viewModel to read/write data from cookies.