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

Function Page

packages/preact-query/src/__tests__/QueryClientProvider.test.tsx:28–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26 const queryClient = new QueryClient({ queryCache })
27
28 function Page() {
29 const { data } = useQuery({
30 queryKey: key,
31 queryFn: () => sleep(10).then(() => 'test'),
32 })
33
34 return (
35 <div>
36 <h1>{data}</h1>
37 </div>
38 )
39 }
40
41 const rendered = render(
42 <QueryClientProvider client={queryClient}>

Callers

nothing calls this directly

Calls 3

sleepFunction · 0.90
useQueryFunction · 0.50
useQueryClientFunction · 0.50

Tested by

no test coverage detected