Vue 3 · Reactivity

Run code after mounting

Use lifecycle hooks such as onMounted and onUnmounted.

onMounted(() => {
  console.log("mounted");
});

Official Vue 3 documentation

More reactivity commands

All reactivity commands · Vue 3 cheatsheet

Was this page helpful?