Skip to content

Interface: RouteNode

API / @xmachines/play-router / index / RouteNode

Defined in: packages/play-router/src/types.ts:179

A node of the route tree. It represents one route

Properties

PropertyTypeDescriptionDefined in
childrenRouteNode[]The child routespackages/play-router/src/types.ts:204
fullPathstringThe 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.packages/play-router/src/types.ts:193
idstringThe unique identifier, which is the state IDpackages/play-router/src/types.ts:181
metadataRouteMetadataThe original meta.route metadatapackages/play-router/src/types.ts:208
parentRouteNode | nullThe parent route. It is null for the rootpackages/play-router/src/types.ts:206
pathstringThe 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.packages/play-router/src/types.ts:187
pattern?stringThe route pattern with its parameters, for example /profile/:userId, when path holds a parameterpackages/play-router/src/types.ts:195
routablebooleanIt 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 eventpackages/play-router/src/types.ts:202
stateIdstringThe XState state ID of this routepackages/play-router/src/types.ts:197