Files
upstream-mirror 3a013ccdfe
Some checks failed
autofix.ci / autofix (push) Failing after 4s
Release / Release (push) Has been skipped
GitHub Actions Security Analysis / Run zizmor (push) Failing after 2s
snapshot of https://github.com/TanStack/query.git (main, 2026-09-16; blobs > 131072B omitted)
2026-09-16 01:13:08 +05:00

729 B

id, title
id title
useQueryClient useQueryClient
function useQueryClient(queryClient?): QueryClient;

Defined in: packages/solid-query/src/QueryClientProvider.tsx:28

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.