- Full-Stack Vue.js 2 and Laravel 5
- Anthony Gore
- 140字
- 2021-07-02 19:57:21
Reactive data properties
Another one of Vue's initialization steps is to walk through all of the data properties and assign them getters and setters. If you look in the following screenshot, you can see how each property in our current app has agetandsetfunction added to it:

Figure 2.9. Getters and setters
Vue added these getters and setters to enable it to perform dependency tracking and change notification when the properties are accessed or modified. So, when thecontractedvalueis changed by theclickevent, itsset method is triggered. Thesetmethod will set the new value, but will also carry out a secondary task of informing Vue that a value has changed and any part of the page relying on it may need to be re-rendered.
If you'd like to know more about Vue's reactivity system, check out the articleReactivity In Vue.js (And Its Pitfalls) athttps://vuejsdevelopers.com/2017/03/05/vue-js-reactivity/.
- Python快樂編程:人工智能深度學習基礎
- Mastering Zabbix(Second Edition)
- JavaScript:Functional Programming for JavaScript Developers
- Windows系統管理與服務配置
- Python機器學習實戰
- 大數據分析與應用實戰:統計機器學習之數據導向編程
- Learning PHP 7
- ElasticSearch Cookbook(Second Edition)
- Hands-On Full Stack Development with Spring Boot 2.0 and React
- Hack與HHVM權威指南
- 計算機應用基礎(Windows 7+Office 2010)
- 高性能MVVM框架的設計與實現:San
- Linux Networking Cookbook
- Learning Scrapy
- FORTRAN程序設計權威指南