MCPcopy
hub / github.com/TanStack/query / Page

Function Page

packages/solid-query/src/__tests__/QueryClientProvider.test.tsx:22–36  ·  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: async () => {
26 await sleep(10)
27 return 'test'
28 },
29 }))
30
31 return (
32 <div>
33 <h1>{query.data}</h1>
34 </div>
35 )
36 }
37
38 const rendered = render(() => (
39 <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

Used in the wild real call sites across dependent graphs

searching dependent graphs…