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

Function getRouter

examples/solid/start-basic-solid-query/src/router.tsx:8–24  ·  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
11 const router = createRouter({
12 routeTree,
13 context: { queryClient },
14 defaultPreload: 'intent',
15 defaultErrorComponent: DefaultCatchBoundary,
16 defaultNotFoundComponent: () => <NotFound />,
17 })
18 setupRouterSsrQueryIntegration({
19 router,
20 queryClient,
21 })
22
23 return router
24}
25
26declare module '@tanstack/solid-router' {
27 interface Register {

Callers

nothing calls this directly

Calls 2

createRouterFunction · 0.90

Tested by

no test coverage detected