Interface: PlayActor
API / @xmachines/play-router / PlayActor
Defined in: types.ts:297
Full actor shape used by PlayRouterProvider components across all framework
adapters (play-solid-router, play-tanstack-solid-router, play-vue-router,
play-tanstack-react-router, play-react-router).
Extends RoutableActor with currentView — the provider renders the current
view spec in addition to synchronizing routes, so it needs both capabilities.
- Use
RoutableActorwhen only routing is needed (e.g.RouterBridgeBasesubclasses,connectRouter). - Use
PlayActorwhen the component also renders the current view spec (e.g.PlayRouterProviderrenderer callback parameter,PlayRenderer).
All AbstractActor subclasses that implement both Routable and Viewable
satisfy this interface structurally.
Example
import type { PlayActor } from "@xmachines/play-router";
function MyRouterProvider({ actor }: { actor: PlayActor }) { // access actor.currentRoute (routing) and actor.currentView (rendering)}Extends
Properties
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
currentRoute | readonly | Computed<string | null> | TC39 Signal exposing the actor’s current URL path (or state ID). | RoutableActor.currentRoute | types.ts:261 |
currentView | readonly | State<PlaySpec | null> | TC39 Signal exposing the actor’s current view spec, or null when inactive. | - | types.ts:299 |
initialRoute | readonly | string | null | The route derived from the machine’s initial state — fixed at construction. Router bridges compare this against the browser URL to distinguish a deep-link (router wins) from a session restore (actor wins). | RoutableActor.initialRoute | types.ts:267 |
Methods
send()
send(event): void;Defined in: types.ts:269
Send a route navigation event to the actor.
Parameters
| Parameter | Type |
|---|---|
event | PlayRouteEvent |
Returns
void