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
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
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 :)