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

__root.tsx

19 lines391 Bytes

1import { Outlet, createRootRouteWithContext } from '@tanstack/react-router'
2import { Toaster } from 'react-hot-toast'
3import type { QueryClient } from '@tanstack/react-query'
4​
5export const Route = createRootRouteWithContext<{
6 queryClient: QueryClient
7 isRestoring: boolean
8}>()({
9 component: Root,
10})
11​
12function Root() {
13 return (
14 <>
15 <Outlet />
16 <Toaster />
17 </>
18 )