0👍
It’s explained in the docs:
Note that you should not use an arrow function to define a method (e.g.
plus: () => this.a++
). The reason is arrow functions bind the parent context, sothis
will not be the Vue instance as you expect andthis.a
will be undefined.
- [Vuejs]-How do I use a vuejs plugin with Laravel Spark's build system?
- [Vuejs]-How can I solve "Uncaught ReferenceError: Pusher is not defined"? Vue.js 2
Source:stackexchange.com