Vue.jsUsing "this" in Vue

Download Vue.js for free


One of the most common errors we find in Vue code on StackOverflow is the misuse of this. The most common mistakes fall generally in two areas, using this in callbacks for promises or other asynchronous functions and using arrow functions to define methods, computed properties, etc.

Related Examples

RIGHT! Define methods with the typical function syntax