Skip to content

Types: CreateRouteOptions<TName, TMeta>

ts
type CreateRouteOptions<TName, TMeta> = object;

Type Parameters

Type ParameterDefault type
TName extends string | undefinedstring | undefined
TMeta extends RouteMetaRouteMeta

Properties

PropertyTypeDescription
component?ComponentAn 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 | WithParamsHash part of URL.
meta?TMetaRepresents additional metadata associated with a route, customizable via declaration merging.
name?TNameName for route, used to create route keys and in navigation.
parent?RouteAn optional parent route to nest this route under.
path?string | WithParamsPath part of URL.
prefetch?PrefetchConfigDetermines what assets are prefetched when router-link is rendered for this route. Overrides router level prefetch.
query?string | WithParamsQuery (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.