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 | WithParams | Hash part of URL. |
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 | WithParams | 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 | WithParams | 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. |