Skip to content

Interface: PlayRouterProviderProps<TActor>

API / @xmachines/play-tanstack-react-router / PlayRouterProviderProps

Defined in: play-tanstack-react-router/src/play-router-provider.tsx:29

Type Parameters

Type ParameterDefault type
TActor extends PlayActorPlayActor

Properties

PropertyTypeDescriptionDefined in
actorTActorThe actor to sync with TanStack 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.play-tanstack-react-router/src/play-router-provider.tsx:35
renderer(actor, router) => ReactNodeRenderer callback receives the same concrete actor type that was passed in.play-tanstack-react-router/src/play-router-provider.tsx:52
routeMapRouteMapBidirectional 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]);play-tanstack-react-router/src/play-router-provider.tsx:50
routerTanStackRouterLikeThe TanStack Router instance returned by createRouter.play-tanstack-react-router/src/play-router-provider.tsx:37