watch changes in deep nested arrays vue code example
Example 1: vue deep watch
watch: {
colors: {
handler(newValue){
console.log('colors changed', newValue)
}, deep: true
}
}
Example 2: vue watch object member
// Use a deep watcher for that:
watch: {
item: {
handler(val){
// do stuff
},
deep: true
}
}