Open History to see the last commit
1---
2id: useQueryClient
3title: useQueryClient
4---
5β
6The `useQueryClient` hook returns the current `QueryClient` instance.
7β
8```tsx
9import { useQueryClient } from '@tanstack/react-query'
10β
11const queryClient = useQueryClient({ context })
12```
13β
14**Options**
15β
16- `context?: React.Context<QueryClient | undefined>`
17 - Use this to use a custom React Query context. Otherwise, `defaultContext` will be used.