MCPcopy Index your code
hub / github.com/TanStack/query / Page

Function Page

packages/react-query/src/__tests__/useQueries.test.tsx:48–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46 const results: Array<Array<UseQueryResult>> = []
47
48 function Page() {
49 const result = useQueries({
50 queries: [
51 {
52 queryKey: key1,
53 queryFn: async () => {
54 await sleep(10)
55 return 1
56 },
57 },
58 {
59 queryKey: key2,
60 queryFn: async () => {
61 await sleep(200)
62 return 2
63 },
64 },
65 ],
66 })
67 results.push(result)
68
69 return (
70 <div>
71 <div>
72 data1: {String(result[0].data ?? 'null')}, data2:{' '}
73 {String(result[1].data ?? 'null')}
74 </div>
75 </div>
76 )
77 }
78
79 const rendered = renderWithClient(queryClient, <Page />)
80

Callers

nothing calls this directly

Calls 14

sleepFunction · 0.90
refetchMethod · 0.80
toStringMethod · 0.80
getQueryKeyAFunction · 0.70
getQueryFunctionAFunction · 0.70
getQueryKeyBFunction · 0.70
getQueryFunctionBFunction · 0.70
getSelectorAFunction · 0.70
getSelectorBFunction · 0.70
useWrappedQueriesFunction · 0.70
useQueriesFunction · 0.50
queryOptionsFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…