DEV Community

Margaret W.N
Margaret W.N

Posted on

2

Day 86: Custom events in Vue

A custom event allows the parent component to listen to the events fired by child components. Data can be passed from a child to parent components as a payload of a custom event. $emit() is used to pass a custom event in vue. It take two parameters, the event name in kebab case and the payload(the data you want to pass).

And that is day 86 in a paragraph.

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay