MCPcopy Create free account
hub / github.com/TanStack/router / getRouter

Function getRouter

e2e/solid-start/basic-solid-query/src/router.tsx:8–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6import { NotFound } from './components/NotFound'
7
8export function getRouter() {
9 const queryClient = new QueryClient()
10 const router = createRouter({
11 routeTree,
12 context: { queryClient },
13 scrollRestoration: true,
14 defaultPreload: 'intent',
15 defaultErrorComponent: DefaultCatchBoundary,
16 defaultNotFoundComponent: () => <NotFound />,
17 })
18 setupRouterSsrQueryIntegration({
19 router,
20 queryClient,
21 })
22 return router
23}

Callers

nothing calls this directly

Calls 2

createRouterFunction · 0.90

Tested by

no test coverage detected