| Function | Description |
|---|---|
| createMemoryHistory(base) | Creates a in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere. It’s up to the user to replace that location with the starter location. |
| createRouter({ history, routes, scrollBehavior, parseQuery, stringifyQuery, }) | |
| createWebHashHistory(base) | |
| createWebHistory(base) | |
| onBeforeRouteLeave(leaveGuard) | |
| parseQuery(search) | Transforms a queryString into a LocationQuery object. Accept both, a version with the leading ? and without Should work as URLSearchParams |
| stringifyQuery(query) | Stringifies a LocationQueryRaw object. Like URLSearchParams, it doesn’t prepend a ? |
| useLink(props) | |
| useRoute() | |
| useRouter() | |
| useView(options) |
| Interface | Description |
|---|---|
| NavigationGuard | |
| PostNavigationGuard | |
| RouteLocationMatched | |
| RouteLocationNormalized | Similar to but its RouteLocationNormalized.matched cannot contain redirect records |
| RouteLocationNormalizedLoaded | RouteLocationRaw with |
| RouteLocationOptions | |
| Router | |
| RouteRecordNormalized | |
| RouterOptions | |
| ScrollBehavior_2 |
| Variable | Description |
|---|---|
| Link | |
| START_LOCATION | |
| View |
| Type Alias | Description |
|---|---|
| LocationQuery | Normalized query object that appears in RouteLocationNormalized |
| LocationQueryRaw | Loose LocationQuery object that can be passed to functions like Router.push() and Router.replace() or anywhere when creating a RouteLocationRaw |
| RouteLocationRaw | User-level route location |
| RouteParams | |
| RouteRecord | |
| RouteRecordRaw |