From the course: Learning Vue.js

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Computed properties

Computed properties - Vue.js Tutorial

From the course: Learning Vue.js

Start my 1-month free trial

Computed properties

- [Instructor] Vue.js uses a reactivity system that tracks changes in the data that we declare when we create a view instance. It can tell when changes to the data necessitate re-rendering parts of the DOM. To improve the performance of this process, as well as the readability of our templates, we can make use of something called computed properties. A computed property is something that's derived or calculated based on existing data properties or even other computed properties. In practice, they work a bit like methods, but they have some advantages for organization and performance. Take a look at our mustache expression here that shows how many characters are still available for our description. As JavaScript expressions go, this one's fairly readable, but there are a lot of front-end developers who would say that even this is too much code for what we're claiming as a declarative template. What a computed property…

Contents