官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 岐山县| 泽普县| 建德市| 昌宁县| 祁东县| 宾川县| 南丹县| 岳阳市| 滨州市| 枣阳市| 临夏市| 德昌县| 石阡县| 陵水| 城步| 崇州市| 宁津县| 江阴市| 南郑县| 申扎县| 临泽县| 枣阳市| 交口县| 呈贡县| 宿迁市| 双江| 西华县| 苏尼特左旗| 偏关县| 河南省| 元谋县| 徐水县| 额尔古纳市| 八宿县| 游戏| 常宁市| 新安县| 邵阳市| 海安县| 内乡县| 兰西县|