Skip to content

@xmachines/play-tanstack-router

API / @xmachines/play-tanstack-router

Shared, framework-agnostic TanStack Router bridge base for XMachines Play.

TanStack Router exposes the identical navigate / load / history surface in both its React and Solid flavours, so the entire bridge implementation lives here as TanStackRouterBridgeBase (extending RouterBridgeBase from @xmachines/play-router). The framework adapter packages only subclass it to bind their concrete router type.

This package has no TanStack runtime dependencyTanStackRouterLike is a structural, type-only interface covering the small router surface the bridge uses.

Who consumes it

Usage

import { TanStackRouterBridgeBase } from "@xmachines/play-tanstack-router";
export class MyTanStackBridge extends TanStackRouterBridgeBase {}
const bridge = new MyTanStackBridge(router, actor, routeMap);
bridge.connect();
// Cleanup on unmount
return () => bridge.disconnect();

Exports

  • TanStackRouterBridgeBase — abstract bridge base class
  • TanStackRouterLike — structural (type-only) TanStack router surface
  • TanStackRouteMapLike — narrow route-map surface the bridge requires

License

MIT

@xmachines/play-tanstack-router

Shared, framework-agnostic TanStack Router bridge base for XMachines Play. Consumed by @xmachines/play-tanstack-react-router and @xmachines/play-tanstack-solid-router, which subclass TanStackRouterBridgeBase to bind their concrete router type.

Classes

Type Aliases