© 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 
(1)
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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.