- Vue.js 2 Design Patterns and Best Practices
- Paul Halliday
- 217字
- 2021-06-24 18:33:09
Writing Clean and Lean Code with Vue
In this section, we'll be investigating how a Vue.js instance works at a lower level by looking at how this is handled by Vue. We'll also be looking at the various properties on our instance such as data, computed, watch, as well as best practices when using each one. Furthermore, we'll be looking at the various lifecycle hooks available within our Vue instance, allowing us to call particular functions at various stages of our application. Finally, we'll be investigating the Document Object Model (DOM) and why Vue implements a Virtual DOM for enhanced performance.
By the end of this chapter you will:
- Have a greater understanding of how this keyword works within JavaScript
- Understand how Vue proxies this keyword within Vue instances
- Use data properties to create reactive bindings
- Use computed properties to create declarative functions based on our data model
- Use watched properties to access asynchronous data and build upon the foundations of computed properties
- Use lifecycle hooks to activate functionality at particular stages of the Vue lifecycle
- Investigate the DOM and Virtual DOM for an understanding of how Vue renders data to the screen
To begin, let's start off by looking into how this works within JavaScript and how this relates to the context within our Vue instances.
推薦閱讀
- Web安全防護指南:基礎(chǔ)篇
- Modern JavaScript Web Development Cookbook
- FreeSWITCH 1.2
- 網(wǎng)管員典藏書架:網(wǎng)絡(luò)管理與運維實戰(zhàn)寶典
- 5G承載網(wǎng)網(wǎng)絡(luò)規(guī)劃與組網(wǎng)設(shè)計
- Force.com Development Blueprints
- 計算機網(wǎng)絡(luò)工程實用教程(第2版)
- 通信原理及MATLAB/Simulink仿真
- 網(wǎng)絡(luò)環(huán)境中基于用戶視角的信息質(zhì)量評價研究
- 5G技術(shù)與標(biāo)準(zhǔn)
- 數(shù)字王國里的虛擬人:技術(shù)、商業(yè)與法律解讀
- 物聯(lián)網(wǎng)技術(shù)與實踐
- 物聯(lián)網(wǎng)傳感器技術(shù)與應(yīng)用
- 通信系統(tǒng)實戰(zhàn)筆記:無處不在的信號處理
- 加密與解密實戰(zhàn)全攻略