Learn Vue JS course Learn Javascript and Vue JS Learn VueJS course Learn VueJS Tutorial

Master Vue.js with Vue School Premium

$25 / month

The Vue.js Master Class

Master Vue.js with Vue School Premium

$25 / month

In Component Navigation Guards

Route protection is essential in any application that allows users to authenticate and in this lesson, we're learning how to protect Vue components with navigation guards. A navigation guard acts as a middleware that can protect a route component.

We're also learning how to access data from child components through component refs and how to prevent navigation if a user has made changes to a form.

Click here for the exercise solution.