Deep Watching Concepts
When using Vue.js to watch a data property, you can purposefully observe keys inside an object for changes, rather than changes to the object itself. This is done by setting the optional deep
property to true
:
data() { Â Â return { Â Â Â Â Â Â organization: { Â Â Â Â Â Â Â Â name: 'ABC', Â Â Â Â Â Â Â Â employees: [ Â Â Â Â Â Â Â Â Â Â Â Â 'Jack', 'Jill' Â Â Â Â Â Â Â Â ] Â Â Â Â Â Â } Â Â } }, watch: { Â Â Â Â organization: { Â Â Â Â Â Â handler: function(v) { Â Â Â Â Â Â Â Â this.sendIntercomData() Â Â Â Â Â Â }, Â Â Â Â Â Â deep: true, Â Â Â Â Â Â immediate: true, Â Â &...