Skip to content

Interface: PlayActor

API / @xmachines/play-vue-router / PlayActor

Defined in: play-router/src/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 RoutableActor when only routing is needed (e.g. RouterBridgeBase subclasses, connectRouter).
  • Use PlayActor when the component also renders the current view spec (e.g. PlayRouterProvider renderer 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

PropertyModifierTypeDescriptionInherited fromDefined in
currentRoutereadonlyComputed<string | null>TC39 Signal exposing the actor’s current URL path (or state ID).RoutableActor.currentRouteplay-router/src/types.ts:261
currentViewreadonlyState<PlaySpec | null>TC39 Signal exposing the actor’s current view spec, or null when inactive.-play-router/src/types.ts:299
initialRoutereadonlystring | nullThe 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.initialRouteplay-router/src/types.ts:267

Methods

send()

send(event): void;

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

Send a route navigation event to the actor.

Parameters

ParameterType
eventPlayRouteEvent

Returns

void

Inherited from

RoutableActor.send