Interface: PlayRouterProviderBaseProps<TRouter, TActor>
API / @xmachines/play-tanstack-react-router / PlayRouterProviderBaseProps
Defined in: play-tanstack-react-router/src/create-play-router-provider.tsx:46
The props that every React PlayRouterProvider of the factory shares.
An adapter package re-exports a concrete alias, with TRouter bound to the type of
its router instance. For example, PlayRouterProviderProps<TActor> in
@xmachines/play-tanstack-react-router binds TRouter to the type of the TanStack
Router instance.
Extended by
Type Parameters
| Type Parameter | Default type |
|---|---|
TRouter | - |
TActor extends PlayActor | PlayActor |
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
actor | TActor | The actor to keep in step with the router. It must be a stable reference: give the same actor instance on every render. An actor in the JSX, or a new actor on each render, makes the bridge disconnect and connect again each time. | play-tanstack-react-router/src/create-play-router-provider.tsx:52 |
renderer | (actor, router) => ReactNode | The renderer callback receives the same concrete actor type as the prop. | play-tanstack-react-router/src/create-play-router-provider.tsx:69 |
routeMap | RouteMap | The route map of both directions, for the lookup between a state ID and a URL path. It must be a stable reference. The provider builds the bridge again on each change of the identity of routeMap. A value in the JSX, for example createRouteMapFromTree(routeTree), makes a new object on every render, and the bridge therefore connects again on every render. Hold the value with useMemo: const routeMap = useMemo(() => createRouteMapFromTree(routeTree), [routeTree]); | play-tanstack-react-router/src/create-play-router-provider.tsx:67 |
router | TRouter | The router instance that the bridge keeps in step with the actor. It must be a stable reference. | play-tanstack-react-router/src/create-play-router-provider.tsx:54 |