beforeUnmount vs unmounted #8924
Replies: 2 comments 1 reply
|
Develop reusable components can use |
|
The split is not really “views use Use Use So a practical rule is: onBeforeUnmount(() => {
// last chance while this component is still alive
})
onUnmounted(() => {
// normal external cleanup after Vue has torn it down
})For most simple cleanup, |
Uh oh!
There was an error while loading. Please reload this page.
Vue has the lifecycle hooks that are called
beforeUnmountandunmounted. When is the right use for each one and when should prefer using one vs the other?All reactions