TLDR.chat
Get the extension
Colour theme
New summary

Reading settings

Typeface
Text size
Line spacing
Line width

Emitting and Listening to Events in Vue Components

Summary of Learn Vue with Evan You · Open original ↗Vuejs · Jan 1, 2023

The text provides an overview of emitting and listening to events in Vue components. It explains how components can emit custom events using the $emit method and how parents can listen to these events using v-on. The text also covers event arguments, declaring emitted events, events validation, and passing events as props. It emphasizes the use of kebab-cased event listeners and recommends defining all emitted events to better document component behavior. Additionally, it discusses the use of emits option for TypeScript and warns about the unstable behavior of props.onEvent when passing both @event and :on-event.

Ask about this page

Ask anything about the original page. Answers come from its text.

Only you see your questions. We don't save them.

Enter to send · Shift+Enter for a new line