Skip to content

Interface: RouteNode

API / @xmachines/play-router / RouteNode

Defined in: play-router/src/types.ts:84

A node of the route tree. It represents one route

Properties

PropertyTypeDescriptionDefined in
childrenRouteNode[]The child routesplay-router/src/types.ts:109
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.play-router/src/types.ts:98
idstringThe unique identifier, which is the state IDplay-router/src/types.ts:86
metadataRouteMetadataThe original meta.route metadataplay-router/src/types.ts:113
parentRouteNode | nullThe parent route. It is null for the rootplay-router/src/types.ts:111
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.play-router/src/types.ts:92
pattern?stringThe route pattern with its parameters, for example /profile/:userId, when path holds a parameterplay-router/src/types.ts:100
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 eventplay-router/src/types.ts:107
stateIdstringThe XState state ID of this routeplay-router/src/types.ts:102