You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just recently learned from the 3rd sources that
vue_component.$once('hook:beforeDestroy', function () { ... } )
can be used to subscribe to the lifecycle events of individual components.
In my case this is very convenient, it enables me to automatically shut down the no longer necessary websocket connection that is used to receive real-time updates on a certain page of my SPA.
Would it be possible to mention this great fact in the official documentation? I couldn't find any reference to it anywhere. There are several mentioning of the word hook in the documentation and they all seem to connote some other unrelated things.