From the course: Vue.js 3 Essential Training

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Computed content

Computed content

- [Tutor] Using expressions in your templates is pretty powerful, but after a while, it can get pretty complicated and hard to maintain. And there are better ways. Now, the first is something called computed properties. There are calculations that are cached on reactive data. What that means is that you can create essentially what becomes a new variable in your application. And that variable can do something with existing data. Now, they will automatically cash if it's tracking reactive data. Here, all we're doing is filtering this array so that it displays any items that are less than $50. So it would return an array with these two elements. Now in here, we are not tracking any reactive properties. So the computed properties wouldn't be able to notice any changes in these elements. More of this in a second, when we'll take a look at a good example, that illustrates that. Right, the other way of doing this is called…

Contents