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

Function Page

packages/preact-query/src/__tests__/useQuery.test.tsx:58–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56 const key = queryKey()
57
58 function Page() {
59 const { data = 'default' } = useQuery({
60 queryKey: key,
61 queryFn: () => sleep(10).then(() => 'test'),
62 })
63
64 return (
65 <div>
66 <h1>{data}</h1>
67 </div>
68 )
69 }
70
71 const rendered = renderWithClient(queryClient, <Page />)
72

Callers

nothing calls this directly

Calls 14

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