Put in order · Vue.js course · Module 8: Slots & Dynamic Components

Lifecycle with KeepAlive

Order the lifecycle hooks of a component with KeepAlive:

Items to put in order

  • onDeactivated() - switching to another component
  • onMounted() - first render
  • onActivated() - returning to the component

You can check the correct answer by solving this task in the CodeWorlds game.