
Equivalent to using $router inside templates. (0) ) IMO this should be a supported API for the issues and popular use-case liudangyi mentions, I only want to define my auth guard rules in one place and when I sign out I would like to re-run the route guards which handles where to navigate to. Equivalent to using $route inside templates. ▸ useRoute(): RouteLocationNormalizedLoaded ▸ useLink( props): Object Parameters Name The guard is removed when the component is unmounted. Similar to beforeRouteUpdate but can be used in any component. ▸ onBeforeRouteUpdate( updateGuard): voidĪdd a navigation guard that triggers whenever the current location is about to be updated. Similar to beforeRouteLeave but can be used in any component. Parameters NameĪdd a navigation guard that triggers whenever the component for the current location is about to be left. ▸ isNavigationFailure( error, type?): error is NavigationFailure Parameters NameĮnsures a route is loaded, so it can be passed as o prop to. Const RouterView: () => ) Parameters Name.Ƭ UseLinkOptions: VueUseOptions Variables RouterLink Ĭomponent to render a link that triggers a navigation on click. Ƭ RouteRecordRaw: RouteRecordSingleView | RouteRecordSingleViewWithChildren | RouteRecordMultipleViews | RouteRecordMultipleViewsWithChildren | RouteRecordRedirect Possible values for a user-defined route record's name Ƭ RouteLocationRaw: string | RouteLocationPathRaw | RouteLocationNamedRaw Ƭ RouteComponent: Component | DefineComponentĪllowed Component in RouteLocationMatched on reset on finish bug HarlowShow/grumblr57 I tend to stay away from watch, and not because of performance problems (its as performant as other Vues reactive stuff like computed props and template expressions), but because it breaks the declarativeness of the view layer of the application. Loose LocationQuery object that can be passed to functions like push and replace or anywhere when creating a RouteLocationRaw

Normalized query object that appears in RouteLocationNormalized API Documentation API Documentation Enumerations
