1👍
✅
If you use an arrow function this
will no longer reference the Vue instance. You need to use the function
keyword here:
buttonClicked: function() {
const newText = "The new value is" + Math.floor(Math.random() * 100);
this.myLocalProperty = newText;
}
Source:stackexchange.com