MCPcopy Index your code
hub / github.com/TanStack/query / shouldSuspend

Function shouldSuspend

packages/react-query/src/suspense.ts:54–59  ·  view source on GitHub ↗
(
  defaultedOptions:
    | DefaultedQueryObserverOptions<any, any, any, any, any>
    | undefined,
  result: QueryObserverResult<any, any>,
)

Source from the content-addressed store, hash-verified

52) => result.isLoading && result.isFetching && !isRestoring
53
54export const shouldSuspend = (
55 defaultedOptions:
56 | DefaultedQueryObserverOptions<any, any, any, any, any>
57 | undefined,
58 result: QueryObserverResult<any, any>,
59) => defaultedOptions?.suspense && result.isPending
60
61export const fetchOptimistic = <
62 TQueryFnData,

Callers 2

useBaseQueryFunction · 0.90
useQueriesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…