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

Function Page

packages/react-query/src/__tests__/useQuery.promise.test.tsx:53–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51 }
52
53 function Page() {
54 useTrackRenders()
55 const query = useQuery({
56 queryKey: key,
57 queryFn: async () => {
58 await vi.advanceTimersByTimeAsync(1)
59 return 'test'
60 },
61 })
62
63 return (
64 <React.Suspense fallback={<Loading />}>
65 <div>
66 <MyComponent promise={query.promise} />
67 </div>
68 <div>status:{query.status}</div>
69 </React.Suspense>
70 )
71 }
72
73 await renderStream.render(
74 <QueryClientProvider client={queryClient}>

Callers

nothing calls this directly

Calls 7

useTheQueryFunction · 0.85
optionsFunction · 0.70
useQueryFunction · 0.50
fetchQueryMethod · 0.45
refetchQueriesMethod · 0.45
cancelQueriesMethod · 0.45
setQueryDataMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…