Put in order · Vue.js course · Module 14: Directives & Plugins

Directive cleanup pattern

Arrange the steps of the directive cleanup pattern in the correct order:

Items to put in order

  • unmounted: remove event listener
  • mounted: save handler reference on el
  • mounted: add event listener

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