Vue.js · Function
onUnmounted
onUnmounted() registers a callback that runs after a component is unmounted. Use it to clean up manually created side effects such as timers, event listeners, and server connections.
Last updated
Syntax
function onUnmounted(callback: () => void, target?: ComponentInternalInstance | null): voidIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
onMounted()onBeforeUnmount()onBeforeMount()onBeforeUpdate()onUpdated()