xxxxxxxxxx
$ npm i @tanstack/react-query-devtools
# or
$ pnpm add @tanstack/react-query-devtools
# or
$ yarn add @tanstack/react-query-devtools
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
function App() {
return (
<QueryClientProvider client={queryClient}>
{/* The rest of your application */}
<ReactQueryDevtools initialIsOpen={false} />
</QueryClientProvider>
)
}
xxxxxxxxxx
import { ReactQueryDevtools } from 'react-query/devtools'
function App() {
return (
<QueryClientProvider client={queryClient}>
{/* The rest of your application */}
<ReactQueryDevtools initialIsOpen={false} />
</QueryClientProvider>
)
}
xxxxxxxxxx
// version 3
import { ReactQueryDevtools } from 'react-query/devtools'
// version 4
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
<QueryClientProvider client={queryClient}>
{/* The rest of your application */}
<ReactQueryDevtoolsPanel initialIsOpen={false} />
</QueryClientProvider>
// By default this is only included in bundles when node env equals dev,
// so no need to worry about excluding it from production builds.