Skip to content
Level 7 of 7 · onDeactivated instead of unmounting

KeepAlive hides the child

Child sits inside <KeepAlive>. Hiding it deactivates it instead of unmounting. Two cards never fire.

What happensshow is true. The learner clicks Hide, which sets show to false.
App.vue
Child.vue
<!-- App.vue -->
<KeepAlive>
  <Child v-if="show" />
</KeepAlive>
Deck · tap a card to add it, or drag it into place
Timeline · first to last
  1. Next card