How it works
You can watch data property of any Vue instance. When watching a property, you trigger a method on change:
You can retrieve the old value and the new one:
If you need to watch nested properties on an object, you will need to use the deep property:
When is the data updated?
If you need to trigger the watcher before making some new changes to an object, you need to use the nextTick() method: