- What is the life cycle?
Vue instance has a full life cycle, that is, from creation to start, initialization data, compiled templates, Mount Dom -> Render, Update -> Render, unloading a series of processes, we called it a Vue life cycle.
Roles of the various life cycle
Life cycle | description |
---|---|
beforeCreate | Before the beginning of the component instance is created, the properties of the component into force |
created | Examples of the component has been fully created, the property also bind, but real dom does not get created, $ el is not yet available |
beforeMount | Mount is called before the start: the first related to the render function is called |
mounted | Call the hook vm el newly created. $ El replaced, and mount up after instance |
beforeUpdate | Call before the component data update occurs before the DOM virtual patching |
updated | After the component data update |
activited | keep-alive exclusive, component is called when activated |
deadctivated | When the call is destroyed keep-alive exclusive, component |
beforeDestory | Components destroyed before calling |
destoryed | After the destruction of the component calls |