Updating Hooks

Learn and practice the two Vue lifecycle hooks related to updating—beforeUpdate and updated.

Whenever a component is updated, the beforeUpdate hook is called right before the update. Right after, the updated hook is invoked. We’ll look into what Vue considers an update later in this lesson. First, we need to know how we can implement these hooks.

Adding the hooks

We can add them the same way we introduce all the other hooks since they are component options. We can add them as functions on the app.

Get hands-on with 1200+ tech skills courses.