1. 16
    Build a Component and Pass Props to It in Vue
    3m 35s

Build a Component and Pass Props to It in Vue

Share this video with your friends

Send Tweet

We'll use the app.component function to make a component and add it to our template. We'll pass through props into the component and use these to initialize the state of our component.

In this component, we'll accept data with the props key, display the data with the template key and bind data in our data key in our component config object. By doing so we'll be able to select the number of tickets that we would like to buy at each ticket type level.