2.5.16
https://jsfiddle.net/86s8qufj/
I expect that watcher for 'testInfo' property will be called when I change it in beforeDestory hook.
I change 'testInfo' property in beforeDestroy hook, but watcher doesn't called.
Also if you try to log testInfo in destroyed hook - you will see new value. But the Object should be destroyed....
beforeDestroy
happens right before tearing down the Vue instance, so it's normal for watchers not to trigger as they would trigger once the instance is destroyed (making most watcher functions invalid).
You should call the watcher yourself in the beforeDestroy
hook instead of changing data
I would say it would be nice to mention it in documentation - cause now there is "Called right before a Vue instance is destroyed. At this stage the instance is still fully functional."
Most helpful comment
I would say it would be nice to mention it in documentation - cause now there is "Called right before a Vue instance is destroyed. At this stage the instance is still fully functional."