This lesson is for members. Join us?
Subscribe now and get immediate access to this course, 30 more and all future Vue.js courses!
Forcing Vue Router to Destroy Component to Trigger Lifecycle Hooks
In this lesson, we learn how to force Vue Router to destroy the component when we're navigating to another route that uses the same page component. This is important when you're relying on Vue's lifecycle hooks as we do to fetch vital data from our database.
If we do not force Vue Router 4 to destroy the current component when we're navigating to another route, it will reuse the same component and not re-fire the created hook.
We also get the user profile form saving data to the Firestore.