Router helpers
Small, focused composables that build on top of vue-router. Each helper covers a single concern — reading a parameter, exposing the route meta, scoping a navigation function — and is independent of the others.
Helpers
useIsView— match the active route against a name with strict or loose comparisonuseNamedRoute— provide a depth key for named<router-view>and expose the matched route recorduseNavigate— composable wrapper aroundrouter.push/router.replacewith support for chained wrappersuseRouteMeta— merge the meta of every matched record into a single objectuseRouteNames— list the names of every matched record from outermost to innermostuseRouteParam— read a single route parameter with a fallback defaultuseRouteView— return the component matched by a named view, ornull
Looking for more?
@basmilius/routing builds on the same primitives and adds higher-level features such as named modal routing, nested layouts and view scopes. If you need anything beyond these direct wrappers, start there.