Types: CreateRouteOptions<TName, TMeta>
ts
type CreateRouteOptions<TName, TMeta> = object;Type Parameters
| Type Parameter | Default type |
|---|---|
TName extends string | undefined | string | undefined |
TMeta extends RouteMeta | RouteMeta |
Properties
| Property | Type | Description |
|---|---|---|
component? | Component | An optional component to render when this route is matched. Default RouterView |
components? | Record<string, Component> | An object of named components to render using named views |
context? | RouteContext[] | Related routes and rejections for the route. The context is exposed to the hooks and props callback functions for this route. |
hash? | string | UrlPart | Hash part of URL. |
hoist? | boolean | When true, the route will be hoisted to the top of the route tree. The route will continue to inherit meta, state, hooks, matches, and context from it's parent, but not the "url" properties. |
meta? | TMeta | Represents additional metadata associated with a route, customizable via declaration merging. |
name? | TName | Name for route, used to create route keys and in navigation. |
parent? | Route | An optional parent route to nest this route under. |
path? | string | UrlPart | Path part of URL. |
prefetch? | PrefetchConfig | Determines what assets are prefetched when router-link is rendered for this route. Overrides router level prefetch. |
query? | string | UrlQueryPart | Query (aka search) part of URL. |
state? | Record<string, Param> | Type params for additional data intended to be stored in history state, all keys will be optional unless a default is provided. |