Interface: PlayRouterProviderBaseProps<TRouter, TActor>
API / @xmachines/play-react-router / PlayRouterProviderBaseProps
Defined in: play-react-router/src/create-play-router-provider.tsx:34
Props shared by every factory-created React PlayRouterProvider.
Adapter packages re-export a concrete alias with TRouter bound to their
router instance type (e.g. PlayRouterProviderProps<TActor> in
@xmachines/play-react-router binds TRouter to the createBrowserRouter
return type).
Extended by
Type Parameters
| Type Parameter | Default type |
|---|---|
TRouter | - |
TActor extends PlayActor | PlayActor |
Properties
| Property | Type | Description | 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. | play-react-router/src/create-play-router-provider.tsx:40 |
renderer | (actor, router) => ReactNode | Renderer callback receives the same concrete actor type that was passed in. | play-react-router/src/create-play-router-provider.tsx:57 |
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]); | play-react-router/src/create-play-router-provider.tsx:55 |
router | TRouter | The router instance the bridge synchronizes with. Must be a stable reference. | play-react-router/src/create-play-router-provider.tsx:42 |