Interface: RouteContext
API / @xmachines/play-xstate / RouteContext
Defined in: packages/play-xstate/src/routing/types.ts:19
Route build context from machine context.
All URL parameter substitution must go through params — flat context fields are not
inspected. This is intentional: the index signature was removed to enable compile-time
validation of context shapes and IDE autocomplete on context fields.
Machines using formatPlayRouteTransitions have params and query assigned
automatically from each play.route event. Machines that call buildRouteUrl directly
must populate params explicitly.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
basePath? | string | Base path for relative routes | packages/play-xstate/src/routing/types.ts:21 |
hash? | string | Hash fragment | packages/play-xstate/src/routing/types.ts:27 |
params? | Record<string, unknown> | Path-only route parameters to substitute (e.g., :userId from /profile/:userId) | packages/play-xstate/src/routing/types.ts:23 |
query? | Record<string, unknown> | Query parameters | packages/play-xstate/src/routing/types.ts:25 |