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: [ Ссылка ]
[ Ссылка ]
Follow us on Twitter: [ Ссылка ]
Like us on Facebook: [ Ссылка ]
Follow us on Instagram: [ Ссылка ]
We're hiring: [ Ссылка ]
Ещё видео!