O'Reilly logo

Getting to Know Vue.js: Learn to Build Single Page Applications in Vue from Scratch by Brett Nelson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required