DEV Community

Discussion on: How to use Global Navigation Guards with Nuxt Middleware, and why you absolutely should NOT

Collapse
husteadrobert profile image
Robert Hustead Author

Hi! I believe it depends on the navigation guard.

Component navigation guards like beforeRouteLeave or beforeRouteUpdate will not run on page load/refresh. However, something like beforeRouteEnter will run on page load/refresh.

The navigation guard beforeEnter should also run on page load/refresh.

Hope that helps!