Skip to content

Interface: RouteNode

API / @xmachines/play-router / RouteNode

Defined in: types.ts:83

A node of the route tree. It represents one route

Properties

PropertyTypeDescriptionDefined in
childrenRouteNode[]The child routestypes.ts:108
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.types.ts:97
idstringThe unique identifier, which is the state IDtypes.ts:85
metadataRouteMetadataThe original meta.route metadatatypes.ts:112
parentRouteNode | nullThe parent route. It is null for the roottypes.ts:110
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.types.ts:91
pattern?stringThe route pattern with its parameters, for example /profile/:userId, when path holds a parametertypes.ts:99
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 eventtypes.ts:106
stateIdstringThe XState state ID of this routetypes.ts:101