Vue.js · Function
onBeforeUnmount
onBeforeUnmount() registers a callback that Vue runs just before a component is unmounted. The component is still fully functional at that time.
Last updated
Syntax
function onBeforeUnmount(callback: () => void, target?: ComponentInternalInstance | null): voidIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
onMountedonUnmountedonBeforeUpdateonUpdated