5👍
✅
OK, looks like we can use instance.$once("hook:beforeDestroy", () => {
to add callbacks to hooks!
A example would be:
const instance = new Vue({});
instance.$once("hook:beforeDestroy", () => {
console.log('Destroying!');
});
setTimeout(() => {
instance.$destroy();
}, 1000);
<script src="https://vuejs.org/js/vue.min.js"></script>
Source:stackexchange.com