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

Function Component

packages/react-query/src/__tests__/useSuspenseQuery.test.tsx:349–360  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

347 let count = 0
348
349 function Component() {
350 const result = useSuspenseQuery({
351 queryKey: key,
352 queryFn: () => sleep(10).then(() => ++count),
353 staleTime: () => 60 * 1000,
354 })
355 return (
356 <div>
357 <span>data: {result.data}</span>
358 </div>
359 )
360 }
361
362 function Page() {
363 return (

Callers

nothing calls this directly

Calls 2

sleepFunction · 0.90
useSuspenseQueryFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…