Skip to content

Glossary: Vue.js

onMounted

Also written: onUnmounted

Lifecycle hooks: `onMounted(fn)` runs once the component's elements are on the page, and `onUnmounted(fn)` runs when it is removed. Anything started in the first, such as a timer, should be stopped in the second.

Where the book teaches it

Related terms

Lifecycle hookCleanup function