Type Alias: TanStackRouterLike
API / @xmachines/play-tanstack-react-router / TanStackRouterLike
type TanStackRouterLike = object;Defined in: play-tanstack-router/src/tanstack-router-bridge-base.ts:36
Structural (type-only) interface for the TanStack Router surface used by
TanStackRouterBridgeBase. Both @tanstack/react-router and
@tanstack/solid-router instances satisfy it.
Properties
history
history: object;Defined in: play-tanstack-router/src/tanstack-router-bridge-base.ts:44
location
location: object;Current location — populated from window.location when createRouter() runs,
before router.load(). Always available in the browser.
router.state.location is only populated after router.load() and may be stale.
location.pathname
pathname: string;location.search?
optional search?: string;subscribe()
subscribe(handler): () => void;Parameters
| Parameter | Type |
|---|---|
handler | (event) => void |
Returns
() => void
Methods
load()?
optional load(): void | Promise<void>;Defined in: play-tanstack-router/src/tanstack-router-bridge-base.ts:43
Re-runs TanStack route matching and loaders for the current location.
Optional: the bridge calls it (fire-and-forget) after every navigation so
matching/loaders stay in sync even without a mounted <RouterProvider>.
Returns
void | Promise<void>
navigate()
navigate(args): void;Defined in: play-tanstack-router/src/tanstack-router-bridge-base.ts:37
Parameters
| Parameter | Type |
|---|---|
args | { to: string; } |
args.to | string |
Returns
void