We're a place where coders share, stay up-to-date and grow their careers.
IMHO there is a very important thing missing. If you want to watch for a FIELD change in an object or an item change in an array, you need to add deep:true to the watch method and use Vue.set to modify the watched object/array/field.
Hey Roland, thanks for your feedback.
That is true. I will update the article and add it (with links to the original docs about this corner case).
Nevertheless I strongly suggest to use Vue.set whenever possible to avoid pitfalls :)
Vue.set
IMHO there is a very important thing missing. If you want to watch for a FIELD change in an object or an item change in an array, you need to add deep:true to the watch method and use Vue.set to modify the watched object/array/field.
Hey Roland, thanks for your feedback.
That is true. I will update the article and add it (with links to the original docs about this corner case).
Nevertheless I strongly suggest to use
Vue.set
whenever possible to avoid pitfalls :)