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

Function useTheQuery

packages/react-query/src/__tests__/useQuery.promise.test.tsx:1318–1327  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

1316 }
1317
1318 function useTheQuery(input: string) {
1319 return useQuery({
1320 staleTime: Infinity,
1321 queryKey: [key, input],
1322 queryFn: async () => {
1323 await vi.advanceTimersByTimeAsync(1)
1324 return input + ' response'
1325 },
1326 })
1327 }
1328
1329 function Page() {
1330 const [input, setInput] = React.useState('defaultInput')

Callers 2

MyComponentFunction · 0.85
PageFunction · 0.85

Calls 1

useQueryFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…