in VueJS by
How do you watch for nested data changes?

1 Answer

0 votes
by

You can use deep watcher by setting deep: true in the options object. This option enables us to detect nested value changes inside Objects.

vm.$watch('someObject', callback, {
  deep: true
})
vm.someObject.nestedValue = 123
// callback is fired

Note: This is not required to listen for Array mutations.

...