Please explain various lifecycle hooks of VueJs
Interviews2 answers
What are various lifecycle hooks of VueJs ?
2 Answers
All lifecycle hooks automatically have their this context bound to the instance, so that you can access data, computed properties, and methods. This means you should not use an arrow function to define a lifecycle method (e.g. created: () => this.fetchTodos()). The reason is arrow functions bind the parent context, so this will not be the component instance as you expect and this.fetchTodos will be undefined. www.anchoragekitchenremodeling.com
Richard RobinPosted Dec 15, 2021, 2:52 AM EST
1) beforeCreate
2) created
3) beforeMount
4) mounted
5) beforeUpdate
6) updated
7) activated
8) deactivated
9) beforeUnmount
10) unmounted
11) errorCaptured
12) renderTracked
13) renderTriggered
Pranam BhatPosted Nov 3, 2021, 12:28 AM EDT



