MCPcopy Create free account
hub / github.com/TanStack/query / Page

Function Page

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

Source from the content-addressed store, hash-verified

87 const key = createKey()
88
89 function Page() {
90 const { data = 'default' } = useQuery({
91 queryKey: key,
92 queryFn: () => sleep(10).then(() => 'test'),
93 })
94
95 return (
96 <div>
97 <h1>{data}</h1>
98 </div>
99 )
100 }
101
102 const rendered = renderWithClient(queryClient, <Page />)
103

Callers

nothing calls this directly

Calls 15

sleepFunction · 0.90
setActTimeoutFunction · 0.90
refetchFunction · 0.85
refetchMethod · 0.80
useUserInfoQueryFunction · 0.70
prefetchFunction · 0.70
queryFnFunction · 0.70
useQueryFunction · 0.50
removeQueriesMethod · 0.45
refetchQueriesMethod · 0.45
invalidateQueriesMethod · 0.45
setQueryDataMethod · 0.45

Tested by

no test coverage detected