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


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

To learn more about DigitalOcean: https://www.digitalocean.com/
Follow us on Twitter: https://twitter.com/digitalocean
Like us on Facebook: https://www.facebook.com/DigitalOcean
Follow us on Instagram: https://www.instagram.com/thedigitalocean
We’re hiring: http://grnh.se/aicoph1


Duration: 00:08:02
Publisher: DigitalOcean
You can watch this video also at the source.