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

Function Page

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

Source from the content-addressed store, hash-verified

61 const key = queryKey()
62
63 function Page() {
64 const state = useQuery(() => ({
65 queryKey: key,
66 queryFn: () => sleep(10).then(() => 'test'),
67 }))
68
69 return (
70 <div>
71 <h1>{state.data ?? 'default'}</h1>
72 </div>
73 )
74 }
75
76 const rendered = renderWithClient(queryClient, () => <Page />)
77

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