Interface: RouteNode
API / @xmachines/play-router / RouteNode
Defined in: types.ts:83
A node of the route tree. It represents one route
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
children | RouteNode[] | The child routes | types.ts:108 |
fullPath | string | The complete absolute path from the root, for example "/dashboard/overview". Always use fullPath for a match of a browser URL and for the construction of a route map. createRouteMapFromTree and createRouteMap both use this field. | types.ts:97 |
id | string | The unique identifier, which is the state ID | types.ts:85 |
metadata | RouteMetadata | The original meta.route metadata | types.ts:112 |
parent | RouteNode | null | The parent route. It is null for the root | types.ts:110 |
path | string | The raw segment of the route path, as meta.route declares it. It is relative, for example "overview", or absolute, for example "/dashboard". Never use it for a match of a URL: use fullPath for that. | types.ts:91 |
pattern? | string | The route pattern with its parameters, for example /profile/:userId, when path holds a parameter | types.ts:99 |
routable | boolean | It tells you if this state has a route, which means that it has a meta.route field. A state with a meta.route field can receive a play.route event | types.ts:106 |
stateId | string | The XState state ID of this route | types.ts:101 |