Getting Started with Vue.js: #15 Vue Lifecycle Events

Опубликовано: 06 Август 2020
на канале: DigitalOcean
5,079
63

When building our Vue apps, Vue does a great job at binding data, making our views reactive, and handling updating everything. This whole process of Vue creating all the reactivity is called the lifecycle.

There may be instances where we need to hook into the lifecycle so that we can run our own processes. A main reason for hooking into Vue's lifecycle is to grab data when the Vue app is created. We can grab HTTP requests from inside Vue's lifecycle events.

Vue has certain lifecycle events that we can hook into to run our code. The main ones are:
created
mounted
updated
destroyed

Presented by Chris on Code:   / chrisoncode  

https://www.digitalocean.com/
Follow us on Twitter:   / digitalocean  
Like us on Facebook:   / digitalocean  
Follow us on Instagram:   / thedigitalocean  
We're hiring: http://grnh.se/aicoph1