Computed Properties and Watchers

Learn about the computed properties and watchers to enable the project to react to changes.

We'll cover the following

Both computed properties and watchers are also available using the Composition API.

Computed properties

Computed properties are used to recalculate a value each time the reactive data changes. An example of a computed property could be a shopping basket total. Each time a new product is added to the basket, the total will be recalculated.

We’ll start with computed properties by first looking at the problem. Let’s look at the example component below:

Get hands-on with 1200+ tech skills courses.