Question · Vue.js course · Module 14: Directives & Plugins

The mounted hook in a directive

When is the mounted hook called in a Custom Directive?

Answer options

  • When the element is already inserted into the DOM
  • Before the DOM element is created
  • On every component update
  • After the element is removed from the DOM

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