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.

Figure 2.9. Getters <strong>and</strong> setters <strong>Vue</strong> added these getters <strong>and</strong> setters to enable it to perform dependency<br />

tracking <strong>and</strong> change notification when the properties are accessed or modified. So, when the contracted<br />

value is changed by the click event, its set method is triggered. The set method will set the new value, but<br />

will also carry out a secondary task of informing <strong>Vue</strong> that a value has changed <strong>and</strong> any part of the page<br />

relying on it may need to be re-rendered.<br />

If you'd like to know more about <strong>Vue</strong>'s reactivity system, check out<br />

the article Reactivity In <strong>Vue</strong>.<strong>js</strong> (And Its Pitfalls) at https://vue<strong>js</strong>develo<br />

pers.com/2017/03/05/vue-<strong>js</strong>-reactivity/.

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

Saved successfully!

Ooh no, something went wrong!