vuejs watch changed array fetsh changed value code example
Example 1: vue deep watch
watch: {
colors: {
handler(newValue){
console.log('colors changed', newValue)
}, deep: true
}
}
Example 2: vue change deep element
Vue.set(vm.someObject, 'b', 2) //for objects
Vue.set(vm.items, indexOfItem, newValue) //forarrays