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

_app.tsx

13 lines400 Bytes

1import React from 'react'
2import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
3import type { AppProps } from 'next/app'
4​
5export default function MyApp({ Component, pageProps }: AppProps) {
6 const [queryClient] = React.useState(() => new QueryClient())
7​
8 return (
9 <QueryClientProvider client={queryClient}>
10 <Component {...pageProps} />
11 </QueryClientProvider>
12 )