- Full-Stack Vue.js 2 and Laravel 5
- Anthony Gore
- 75字
- 2021-07-02 19:57:14
Reactivity
A key feature of Vue's design is its reactivity system. When you modify data, the view automatically updates to reflect that change.
For example, if we create a function that pushes another item to our array of grocery items after the page has already been rendered, the page will automatically re-render to reflect that change:
setTimeout(function() { app.groceries.push('Apples'); }, 2000);
Two seconds after the initial rendering, we see this:
<p id="app"> <h3>Grocery list</h3> <ul> <li>Bread</li> <li>Milk</li> <li>Apples</li> </ul> </p>
推薦閱讀
- Puppet 4 Essentials(Second Edition)
- Android和PHP開發最佳實踐(第2版)
- Python 深度學習
- oreilly精品圖書:軟件開發者路線圖叢書(共8冊)
- 人臉識別原理及算法:動態人臉識別系統研究
- Windows Server 2012 Unified Remote Access Planning and Deployment
- Visual Basic程序設計與應用實踐教程
- Building Machine Learning Systems with Python(Second Edition)
- Kivy Cookbook
- RESTful Web Clients:基于超媒體的可復用客戶端
- Android應用開發實戰(第2版)
- 零基礎學Java第2版
- Implementing NetScaler VPX?(Second Edition)
- 邊做邊學深度強化學習:PyTorch程序設計實踐
- 匯編語言程序設計