Skip to content

Type Alias: TanStackRouterLike

API / @xmachines/play-tanstack-solid-router / TanStackRouterLike

type TanStackRouterLike = object;

Defined in: play-tanstack-router/src/tanstack-router-bridge-base.ts:37

The type-only interface of the TanStack Router surface that TanStackRouterBridgeBase uses. An instance of @tanstack/react-router and an instance of @tanstack/solid-router both satisfy it.

Properties

history

history: object;

Defined in: play-tanstack-router/src/tanstack-router-bridge-base.ts:46

location

location: object;

The current location. createRouter() fills it from window.location, before router.load(). It is always available in the browser. router.state.location has a value only after router.load(), and that value can be old.

location.pathname
pathname: string;
location.search?
optional search?: string;

subscribe()

subscribe(handler): () => void;
Parameters
ParameterType
handler(event) => void
Returns

() => void

Methods

load()?

optional load(): void | Promise<void>;

Defined in: play-tanstack-router/src/tanstack-router-bridge-base.ts:45

Runs the TanStack route matching and the loaders again for the current location. This method is optional. The bridge calls it after every navigation, and it does not wait for the result. The matching and the loaders therefore stay correct, also when no <RouterProvider> is mounted.

Returns

void | Promise<void>


navigate(args): void;

Defined in: play-tanstack-router/src/tanstack-router-bridge-base.ts:38

Parameters

ParameterType
args{ to: string; }
args.tostring

Returns

void