Instructor: You probably already have some components with some V models. For example, I'll create some data, and we'll return an active tab and set that to zero.
Say you're using that as the V model of a tabs component, so this is the Bulma tabs component from Buefy, which has V tab items. V tab items have labels, so we'll set this label to Luke, that one to Darth, and that one to Leia, so Darth, Leia. Then set the V model here to active tab.
Then just render out the active tab above the tab component. If I click Darth, this changes to one, and Leia, this changes to two. I can watch this V model value as an observable using this.$watchAsObservable, and then a string of active tab. We'll call this our active tab stream.
We can return that and our object, active tab, and now render out our active tab stream. Now you'll notice there's no value there. If I click on Darth, it changes to an object of old value and new value. Leia, old one's Darth, new one's Leia, but if I refresh the page, that value disappears.
We can trigger that to fire right away in here with some options. These are the same options as the $watch of view, and one of them is called immediate. We'll set that to true. That means to fire right away. You can see we get a new value of zero, and I didn't have to click anything. This still works, that still works, and that still works.
You often don't have to worry about the old values. We can go ahead and pluck the new value, hit save, and now this zero up here is an observable stream, which updates whenever my component V model updates.