In my Vue.js I have a function that get labels from a picture using Google Vision. This function is inside a mixin so my code is not so bloated.
I then store the labels as an array in a storeState so I can access it in other components.
What I want is to call another function as soon as my array is stored. So I implemented a watcher:
watch: {
this.storeState.labels: function () {
anotheFunction()
}
}
But I get a Unexpected keyword 'this' error. So how can I trigger another function as soon as my this.storeState.labels is updated?