mirror of
https://github.com/TanStack/query.git
synced 2026-11-16 22:50:20 +00:00
* docs(preact-query): document type parameters with '@template' and add 'useQueryClient' throws note * docs(preact-query): fix TQueryData select direction and TResults/TDepth phrasing flagged by CodeRabbit
662 B
662 B
| id | title |
|---|---|
| useQueryClient | useQueryClient |
function useQueryClient(queryClient?): QueryClient;
Defined in: preact-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.