25.06.2018 Views

Full-Stack Vue.js 2 and Laravel 5

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

One-way data flow<br />

Since props must be declared in the template where the component is used, prop<br />

data can only pass from a parent to a child. This is why you shouldn't mutate a<br />

prop - since data flows down, the change will not be reflected in the parent, <strong>and</strong><br />

therefore you will have different versions of what is meant to be the same bit of<br />

state.<br />

If you do need to tell the owner to change the data, there is a separate interface<br />

for passing data from a child to a parent, which we'll see later.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!