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

Function Page

packages/solid-query/src/__tests__/QueryClientProvider.test.tsx:22–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20 const queryClient = new QueryClient({ queryCache })
21
22 function Page() {
23 const query = useQuery(() => ({
24 queryKey: key,
25 queryFn: () => sleep(10).then(() => 'test'),
26 }))
27
28 return (
29 <div>
30 <h1>{query.data}</h1>
31 </div>
32 )
33 }
34
35 const rendered = render(() => (
36 <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