Learn Vue JS course Learn Javascript and Vue JS Learn VueJS course Learn VueJS Tutorial

Vue.js Components Fundamentals

Communication Between Components with Custom Events

We know how to pass data to a child component through props. In this lesson, we'll learn how to communicate from a child to a parent component through custom events.

We will use a custom event to notify the plan-picker of which plan has been selected, and make sure we have the right logic in place so the user can only select one plan at a time.

Important Note

Since Vue.js 3 became the default you must now specify version 2 when getting Vue from a CDN.

<script src="https://unpkg.com/vue@2"></script>