Types: Route<TName, THost, TPath, TQuery, THash, TMeta, TState, TMatchNames>
type Route<TName, THost, TPath, TQuery, THash, TMeta, TState, TMatchNames>: object;
Represents the structure of a route within the application. Return value of createRoute
Type Parameters
Type Parameter | Default type | Description |
---|---|---|
TName extends string | string | Represents the unique name identifying the route, typically a string. |
THost extends Host | Host | - |
TPath extends Path | Path | The type or structure of the route's path. |
TQuery extends Query | Query | The type or structure of the query parameters associated with the route. |
THash extends Hash | Hash | - |
TMeta extends RouteMeta | RouteMeta | - |
TState extends Record <string , Param > | Record <string , Param > | - |
TMatchNames extends string | undefined | string | undefined | - |
Type declaration
hash
hash: THash;
Represents the hash of the route.
host
host: THost;
Represents the host for this route. Used for external routes.
id
id: string;
Unique identifier for the route, generated by router.
matched
matched: CreateRouteOptionsMatched<TName>;
The specific route properties that were matched in the current route.
matches
matches: CreateRouteOptionsMatched<TMatchNames>[];
The specific route properties that were matched in the current route, including any ancestors. Order of routes will be from greatest ancestor to narrowest matched.
meta
meta: TMeta;
Represents additional metadata associated with a route, combined with any parents.
name
name: TName;
Identifier for the route as defined by user. Name must be unique among named routes. Name is used for routing and for matching.
path
path: TPath;
Represents the structured path of the route, including path params.
prefetch?
optional prefetch: PrefetchConfig;
Determines what assets are prefetched when router-link is rendered for this route. Overrides router level prefetch.
query
query: TQuery;
Represents the structured query of the route, including query params.
state
state: TState;
Represents the schema of the route state, combined with any parents.