Skip to content

Class: VueRouterBridge

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

Defined in: play-vue-router/src/vue-router-bridge.ts:32

@xmachines/play-vue-router - Vue Router 4.x adapter for XMachines Play

Provides bidirectional integration between Vue Router and XMachines state machines.

Extends

Constructors

Constructor

new VueRouterBridge(
vueRouter,
actor,
routeMap): VueRouterBridge;

Defined in: play-vue-router/src/vue-router-bridge.ts:41

Parameters

ParameterType
vueRouterRouterClassic
actorRoutableActor
routeMapRouteMap

Returns

VueRouterBridge

Overrides

RouterBridgeBase.constructor

Methods

connect()

connect(): void;

Defined in: play-router/src/router-bridge-base.ts:151

Connect the router bridge to the Actor.

Sets up the TC39 Signal watcher for actor → router direction and starts watching router changes (framework-specific).

Ordering here is part of the bridge contract:

  • lastSyncedPath is seeded in the constructor from actor.currentRoute
  • the actor watcher is installed before adapter router subscriptions
  • initial sync then resolves deep-link vs restore using actor.initialRoute

Adapters that need custom initial-sync behavior should override getInitialRouterPath() rather than reordering connect() steps.

Returns

void

Inherited from

RouterBridgeBase.connect


disconnect()

disconnect(): void;

Defined in: play-router/src/router-bridge-base.ts:256

Disconnect the router bridge from the Actor.

Stops signal watching and unregisters framework-specific router listener.

Returns

void

Inherited from

RouterBridgeBase.disconnect


dispose()

dispose(): void;

Defined in: play-vue-router/src/vue-router-bridge.ts:203

Cleanup alias for Vue component lifecycle (onUnmounted(() => bridge.dispose())).

Returns

void