In this tutorial we're going to learn how to use v-model attribute with custom components to return the values of the custom component back to the parent component. The v-model attribute is a way of creating a two way binding between the user input and the vuejs component.

The component will then have a data property of message to record the same value the user entered.

In this section we'll look at what the v-model property does and how we can change the custom component to make this work.

Now we can use the v-model and it will change the data property of the parent component like this
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners