0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-18 19:33:22 +00:00
query/docs/framework/react/reference/functions/useQueryClient.md
Wonsuk Choi ba341f5a07
docs(react-query): add missing JSDoc to react-query, react-query-next-experimental, and react-query-devtools (#11843)
* docs(react-query): add missing JSDoc to react-query, react-query-next-experimental, and react-query-devtools

* docs(react-query-next-experimental): correct where streamed hydration and HTML insertion happen
2026-10-04 04:15:50 +09:00

802 B

id title redirect_from
useQueryClient useQueryClient
framework/react/reference/useQueryClient
function useQueryClient(queryClient?: QueryClient): QueryClient;

Defined in: packages/react-query/src/QueryClientProvider.tsx:21

The useQueryClient hook returns the current QueryClient instance.

Parameters

queryClient?

QueryClient

Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used.

Returns

QueryClient

The current QueryClient instance.

Throws

If no queryClient argument is passed and no QueryClientProvider is found in the component tree.