Vue 3 · Components

Declare events

Declare the events a component emits, then emit one.

const emit = defineEmits<{ (e: "update", value: string): void }>();
emit("update", "hello");

Official Vue 3 documentation

More components commands

All components commands · Vue 3 cheatsheet

Was this page helpful?