© Adam Freeman 2018
Adam FreemanPro Vue.js 2https://doi.org/10.1007/978-1-4842-3805-9_17

17. Understanding the Component Lifecycle

Adam Freeman1 
London, UK

When Vue.js creates a component, it begins a well-defined lifecycle that includes preparing the data values, rendering the HTML content in the Document Object Model (DOM), and dealing with any updates. In this chapter, I describe the different stages in the component lifecycle and demonstrate the various ways a component can respond to them.

The component lifecycle is worth your attention for two reasons. First, the more you understand about how Vue.js works, the better prepared you are to diagnose problems when you don’t get the results you expect. The second reason is that some of the advanced ...

Get Pro Vue.js 2 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.