onBeforeRouteUpdate

The onBeforeRouteUpdate composable allows registering a route guard within a component.