Variable: PlayRouterProvider
API / @xmachines/play-tanstack-react-router / PlayRouterProvider
const PlayRouterProvider: <TActor>(__namedParameters) => Element;Defined in: play-tanstack-react-router/src/play-router-provider.tsx:60
Connects a PlayerActor to TanStack React Router. It keeps the actor state and the
browser URL in step, in both directions.
The component creates the bridge one time, on mount, and it disconnects the bridge
on unmount. It also builds the bridge again on a change of the identity of actor,
of router, or of routeMap. Therefore all three props must be stable
references: create them outside the JSX, or hold them with useMemo. Under the
React <StrictMode>, the effect runs two times on mount (connect, disconnect,
connect), and the bridge supports this.
Type Parameters
| Type Parameter |
|---|
TActor extends PlayActor |
Parameters
| Parameter | Type |
|---|---|
__namedParameters | PlayRouterProviderBaseProps<TanStackRouterLike, TActor> |
Returns
Element