onBeforeUnmount and onUnmounted hook of component created by render function is not invoked
Vue version
3.2.47
Link to minimal reproduction
Steps to reproduce
click switch button
What is expected?
alert('onBeforeUnmount')
What is actually happening?
nothing happend
System Info
No response
Any additional comments?
No response
Manually mounting a component with render
means it's not part of the main app's tree, so it won't be unmounted when a parent unmounts. You would need to unmount it yourself.
Manually mounting a component with
render
means it's not part of the main app's tree, so it won't be unmounted when a parent unmounts. You would need to unmount it yourself.
Thanks, how to unmount it?I can't find any way to do it in documentation. @LinusBorg