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

Function Component

packages/react-query/src/__tests__/useSuspenseQueries.test.tsx:616–624  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

614 }
615
616 function Component() {
617 const { data } = useSuspenseQuery({
618 queryKey: key,
619 queryFn: () => sleep(3000).then(() => 'data'),
620 gcTime: 1000,
621 })
622
623 return <div>{data}</div>
624 }
625
626 function Page2() {
627 return <div>page2</div>

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…