The Hooks Related to Errors and Debugging
Learn and practice the lifecycle hooks—errorCaptured, renderTracked, and renderTriggered.
We'll cover the following
This lesson will look at three more lifecycle hooks—errorCaptured
, renderTracked
, and renderTriggered
. We can use errorCaptured
to fine-tune our application and improve feedback for the user. We can use renderTriggered
and renderTracked
to debug our app’s rendering in-depth. Unlike the other lifecycle hooks, these three have default parameters. We’ll look into these a little bit later in this lesson.
Note: It’s important to know that these two hooks have only been introduced with Vue 3. Vue 3 may be the standard for new apps, but if we encounter legacy apps, we’re sadly unable to use these hooks.
Adding the hooks
We can add the hooks just like any other hooks:
Get hands-on with 1200+ tech skills courses.