MCPcopy
hub / github.com/TanStack/query / useQueryClient

Function useQueryClient

packages/svelte-query/src/useQueryClient.ts:4–7  ·  view source on GitHub ↗
(queryClient?: QueryClient)

Source from the content-addressed store, hash-verified

2import type { QueryClient } from '@tanstack/query-core'
3
4export function useQueryClient(queryClient?: QueryClient): QueryClient {
5 if (queryClient) return queryClient
6 return getQueryClientContext()
7}

Callers 7

useHydrateFunction · 0.70
createMutationFunction · 0.70
createBaseQueryFunction · 0.70
createQueriesFunction · 0.70
useMutationStateFunction · 0.70
useIsMutatingFunction · 0.70
useIsFetchingFunction · 0.70

Calls 1

getQueryClientContextFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…