Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

router.tsx

15 lines346 Bytes

1import { createRouter } from '@tanstack/react-router'
2import { QueryClient } from '@tanstack/react-query'
3import { routeTree } from './routeTree.gen'
4​
5export function getRouter() {
6 const queryClient = new QueryClient()
7 const router = createRouter({
8 routeTree,
9 context: {
10 queryClient: queryClient,
11 },
12 })
13​
14 return router