vue component lifecycle

  1. Creation:
  2. beforeCreate: Occurs before the instance is created, data observation, and event/watcher setup.
  3. created: Called synchronously after the instance is created. The data has been observed and the events/watchers have been set up.

  4. Mounting:

  5. beforeMount: Called before the mounting begins: the render function is about to be called for the first time.
  6. mounted: Called after the instance has been mounted, where the component is rendered to the DOM.

  7. Updating:

  8. beforeUpdate: Called when data changes, before the DOM is patched.
  9. updated: Called after a data change causes the DOM to be re-rendered.

  10. Destroying:

  11. beforeDestroy: Called before a Vue instance is destroyed. This is where you can perform cleanup.
  12. destroyed: Called after a Vue instance has been destroyed. Cleanup is done, and the instance is no longer functional.