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.
What will the proposed change look like?
A documentation enhancement.
What is the use case and what needs to be covered?
An example is documented, but there is no list of all the existing hook:X events.
Even though it'll be safe to assume every lifecycle hook will fire a hook:X event, it's not noted anywhere I think.
What problem does this request solve?
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.
What will the proposed change look like?
A documentation enhancement.
What is the use case and what needs to be covered?
A sample write up is provided at vuejs/vue#10312.
The text was updated successfully, but these errors were encountered: