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

Function Page

packages/solid-query/src/__tests__/useQuery.test.tsx:57–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 14

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

Tested by

no test coverage detected