-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Description
Describe the bug
const query = queryOptions({
queryKey: ['foo'],
queryFn: async () => [],
experimental_prefetchInRender: true,
});
const Example: FC = () => {
// ✅ This finishes loading.
// const { promise } = useQuery(query);
// ❌ This never finishes loading.
const [{ promise }] = useQueries({ queries: [query] });
React.use(promise);
return <div>loaded</div>;
};Your minimal, reproducible example
https://stackblitz.com/edit/tanstack-query-5j76gubf?file=src%2Findex.tsx&preset=node
Steps to reproduce
See above.
Expected behavior
experimental_prefetchInRender works with useQueries.
How often does this bug happen?
None
Screenshots or Videos
No response
Platform
N/A
Tanstack Query adapter
None
TanStack Query version
5.90.12
TypeScript version
No response
Additional context
No response
coderabbitai
Metadata
Metadata
Assignees
Labels
No labels