Put in order · Vue.js course · Module 8: Slots & Dynamic Components
Dynamic Component lifecycle with KeepAlive
Arrange the events when switching a component inside <KeepAlive>:
Items to put in order
- The current component is deactivated (onDeactivated)
- The new component is activated (onActivated)
- User switches to a different component
- The previous component's state is preserved in memory
You can check the correct answer by solving this task in the CodeWorlds game.