Skip to content

Type Alias: RouteStateNode

API / @xmachines/play-xstate / RouteStateNode

type RouteStateNode = object;

Defined in: packages/play-xstate/src/routing/format-play-route-transitions.ts:15

Minimal structural shape of a single XState state node as read by formatPlayRouteTransitions when crawling the machine config.

Only the fields the function actually inspects are typed here; all other state-node fields (e.g. on, entry, after) pass through unmodified via the index signature.

Indexable

[key: string]: unknown

Properties

id?

optional id?: string;

Defined in: packages/play-xstate/src/routing/format-play-route-transitions.ts:17

Optional explicit state ID (e.g. "home", "settings"). Used as the #id target in play.route events.


meta?

optional meta?: object;

Defined in: packages/play-xstate/src/routing/format-play-route-transitions.ts:19

State metadata — meta.route marks the state as routable.

route?

optional route?: RouteMetadata;

URL path template — string form (e.g. "/profile/:username") or object form ({ path, title }), matching RouteMetadata.


states?

optional states?: Record<string, RouteStateNode>;

Defined in: packages/play-xstate/src/routing/format-play-route-transitions.ts:27

Nested child states, recursively crawled for additional route declarations.