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

Function FirstQuery

packages/react-query/src/__tests__/usePrefetchQuery.test.tsx:259–267  ·  view source on GitHub ↗
({ children }: { children?: React.ReactNode })

Source from the content-addressed store, hash-verified

257 const Fallback = vi.fn().mockImplementation(() => <div>Loading...</div>)
258
259 function FirstQuery({ children }: { children?: React.ReactNode }) {
260 const state = useSuspenseQuery(firstQueryOpts)
261 return (
262 <div>
263 <div>data: {String(state.data)}</div>
264 {children}
265 </div>
266 )
267 }
268
269 function SecondQuery({ children }: { children?: React.ReactNode }) {
270 const state = useSuspenseQuery(secondQueryOpts)

Callers

nothing calls this directly

Calls 1

useSuspenseQueryFunction · 0.50

Tested by

no test coverage detected