4👍
The "watch" function returns a function which stops the watcher when it is called :
const unwatch = watch(someProperty, () => { });
unwatch(); // It will stop watching
To watch a change only once:
const unwatch = watch(someProperty, () => {
// Do what your have to do
unwatch();
});
- [Vuejs]-Nginx can't load css, js from webpack output
- [Vuejs]-How to set new properties, or push to array with async and await, within callback function?
Source:stackexchange.com