Oct 9, 2019 in Vue.JS
Q: How is  data flow between components in a Vue.js app?

1 Answer

0 votes
Oct 9, 2019

Vue.js uses what’s called a one-way data flow. Data is passed to child components from a given parent component using a prop or a custom attribute that becomes a property on the child component instance.

When the parent component updates a prop value, it’s automatically updated in the child component. Mutating a property inside a child component should not be done. Also, it does not affect the parent component (unless it is an object or array).

The child component can communicate back to the parent via an event. The parent can assign a handler to any event emitted by the child component instance and data can be passed back to the parent. The child component can emit a special event for updating the props passed to it.

Click here to read more about Vue JS
Click here to read more about Insurance