2
Reply

What are various lifecycle hooks of VueJs ?

Ketan Mokariya

Ketan Mokariya

3y
1.1k
2
Reply

Please explain various lifecycle hooks of VueJs

    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

    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