Put in order · Vue.js course · Module 6: Components

Lifecycle handling process

Arrange the steps for adding a lifecycle hook to a component:

Items to put in order

  • Call onMounted(() => { ... })
  • Code inside the callback executes after mounting
  • Import onMounted from 'vue'

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