Description
Vue version
3.5.12
Link to minimal reproduction
Steps to reproduce
- Open reproduction link
- Open browser console
- Toggle the button
- See in the console, that the component's
ComponentThatIsNotProperlyDestroyed
onBeforeUnmount
hook was not called
Switching between the versions in the playground, you can see that it still works as expected in 3.4.31
and does not work anymore after 3.4.32
.
What is expected?
ComponentThatIsNotProperlyDestroyed
gets unmounted correctly (including the lifecycle hooks being called).
What is actually happening?
In our application, we are using vuex
and vue-router
.
After updating vue
from 3.4.31
to 3.4.32
, we observe that some component's computed properties or event listeners are still getting called despite they are not even in the DOM anymore. After updating to 3.5.12
most of the problems went away but we could still reproduce one example and made the reproduction repo above.
System Info
No response
Any additional comments?
Is it intended that the slot rendering function is called by the application code?
We are evaluating to replace this call. But we still wanted file this issue since it only occurs in combination with the v-if="false"
/v-else
pattern (see comments in Page.vue
in the reproduction link).