Skip to content
API/<TanStackRouterAdapter>

<TanStackRouterAdapter>

component
src/components/tanstack-router-adapter.tsx1 parameter

Make TanStack Router the router adapter of every list below it.

Render it inside the router — in the root route’s component, around its <Outlet /> — so the lists read TanStack Router’s location and navigate through it. Only the components that use a list re-render when the URL changes.

import { TanStackRouterAdapter } from '@qubeejs/react/tanstack-router';
function TanStackRouterAdapter(props: TanStackRouterAdapterProps): ReactElement
Parameter Type Description
props TanStackRouterAdapterProps The subtree, and whether a list navigation scrolls to the top

The subtree, with the adapter in context

const rootRoute = createRootRoute({
component: () => (
<TanStackRouterAdapter>
<Outlet />
</TanStackRouterAdapter>
),
});

TanStackRouterAdapterProps