Interface: PlayRouterProviderProps<TActor>
API / @xmachines/play-tanstack-react-router / PlayRouterProviderProps
Defined in: play-tanstack-react-router/src/play-router-provider.tsx:43
Props for the TanStack React Router PlayRouterProvider.
router is the TanStack Router instance returned by createRouter.
See PlayRouterProviderBaseProps for the stable-reference requirements on
actor, router, and routeMap.
Extends
Type Parameters
| Type Parameter | Default type |
|---|---|
TActor extends PlayActor | PlayActor |
Properties
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
actor | TActor | The actor to sync with the router. Must be a stable reference — pass the same actor instance across renders. Creating the actor inline or re-creating it on every render will cause the bridge to disconnect and reconnect each time. | PlayRouterProviderBaseProps.actor | play-tanstack-react-router/src/create-play-router-provider.tsx:51 |
renderer | (actor, router) => ReactNode | Renderer callback receives the same concrete actor type that was passed in. | PlayRouterProviderBaseProps.renderer | play-tanstack-react-router/src/create-play-router-provider.tsx:68 |
routeMap | RouteMap | Bidirectional route map for state ID ↔ URL path lookups. Must be a stable reference. The bridge is rebuilt whenever routeMap changes identity. If constructed inline (e.g. createRouteMapFromTree(routeTree) in JSX), a new object is produced on every render and the bridge reconnects every render. Memoize with useMemo: const routeMap = useMemo(() => createRouteMapFromTree(routeTree), [routeTree]); | PlayRouterProviderBaseProps.routeMap | play-tanstack-react-router/src/create-play-router-provider.tsx:66 |
router | TanStackRouterLike | The router instance the bridge synchronizes with. Must be a stable reference. | PlayRouterProviderBaseProps.router | play-tanstack-react-router/src/create-play-router-provider.tsx:53 |