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(queryClient?: QueryClient)
12```
13β
14**Options**
15β
16- `queryClient?: QueryClient`
17 - Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used.