16 lines
480 B
TypeScript
16 lines
480 B
TypeScript
![]() |
'use client'
|
||
|
|
||
|
import type { FC, PropsWithChildren } from 'react'
|
||
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
||
|
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
|
||
|
|
||
|
const client = new QueryClient()
|
||
|
|
||
|
export const TanstackQueryIniter: FC <PropsWithChildren> = (props) => {
|
||
|
const { children } = props
|
||
|
return <QueryClientProvider client={client}>
|
||
|
{children}
|
||
|
<ReactQueryDevtools initialIsOpen={false} />
|
||
|
</QueryClientProvider>
|
||
|
}
|