© Brett Nelson 2018
Brett NelsonGetting to Know Vue.jshttps://doi.org/10.1007/978-1-4842-3781-6_4

4. Computer Properties and Watchers

Brett Nelson1 
(1)
Eagan, Minnesota, USA
 

Using methods on your Vue instance to get formatted data is great, but it comes with the heavy toll of running every time the view is updated or re-rendered. We can avoid paying this performance toll by using computed properties. Sometimes we also need to be able to perform background, or asynchronous, tasks when the user interacts with the page, but we don’t want to block the user from interacting. Vue provides us the option of using watches in these cases.

In this chapter, we will learn about computer properties and watchers and how to use them in Vue.

Computed Properties

Computed ...

Get Getting to Know Vue.js: Learn to Build Single Page Applications in Vue from Scratch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.