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

Function Page

packages/react-query/src/__tests__/QueryClientProvider.test.tsx:27–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25 const queryClient = new QueryClient({ queryCache })
26
27 function Page() {
28 const { data } = useQuery({
29 queryKey: key,
30 queryFn: () => sleep(10).then(() => 'test'),
31 })
32
33 return (
34 <div>
35 <h1>{data}</h1>
36 </div>
37 )
38 }
39
40 const rendered = render(
41 <QueryClientProvider client={queryClient}>

Callers

nothing calls this directly

Calls 3

sleepFunction · 0.90
useQueryFunction · 0.50
useQueryClientFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…