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

Function options

packages/react-query/src/__tests__/useQuery.promise.test.tsx:944–950  ·  view source on GitHub ↗
(count: number)

Source from the content-addressed store, hash-verified

942 const key = queryKey()
943
944 const options = (count: number) => ({
945 queryKey: [...key, count],
946 queryFn: async () => {
947 await vi.advanceTimersByTimeAsync(10)
948 return 'test' + count
949 },
950 })
951
952 function MyComponent(props: { promise: Promise<string> }) {
953 const data = React.use(props.promise)

Callers 1

PageFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…