You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
experimental_prefetchInRender doesn't work with useQueries #9988
Currently not implemented in useQueries. I think we should generally disallow suspending the same component that calls useQuery and get rid of the experimental flag. I think it's too hacky. What you'd need to do is to pass the promise to a separate component and wrap that in suspense.
I've submitted a fix in #10218. The issue is that useQueries was missing the experimental_prefetchInRender logic that useBaseQuery implements. The fix adds the same prefetch-in-render handling to useQueries, iterating over each query to trigger optimistic fetches or subscribe to cache promises as needed.
Activity
coderabbitai commentedon Dec 23, 2025
📝 CodeRabbit Plan Mode
Generate an implementation plan and prompts that you can use with your favorite coding agent.
Examples
🔗 Similar Issues
Related Issues
useInfiniteQuery+experimental_prefetchInRendernever finishes loading after error boundary reset #9939🔗 Related PRs
#9576 - fix(core): do not reject promise right away - only when
promisegets used [merged]#9639 - fix(query-core, react-query): infinite re-renders in useQueries [merged]
#9772 - fix(core): observing "promise" needs to implicitly observe "data" [merged]
#9822 - fix(solid-query): enable experimental_prefetchInRender by default for… [merged]
TanStack/router#5740 - test(solid-start-ssr-query): remove experimental_prefetchInRender [merged]
#9886 - fix: Prevent infinite render loops when useSuspenseQueries has duplicate queryKeys [merged]
👤 Suggested Assignees
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord or schedule a call!
TkDodo commentedon Dec 30, 2025
Currently not implemented in useQueries. I think we should generally disallow suspending the same component that calls useQuery and get rid of the experimental flag. I think it's too hacky. What you'd need to do is to pass the promise to a separate component and wrap that in suspense.
fix(react-query): add experimental_prefetchInRender support to useQue…
isaackaara commentedon Mar 4, 2026
I've submitted a fix in #10218. The issue is that
useQuerieswas missing theexperimental_prefetchInRenderlogic thatuseBaseQueryimplements. The fix adds the same prefetch-in-render handling touseQueries, iterating over each query to trigger optimistic fetches or subscribe to cache promises as needed.TkDodo commentedon Aug 18, 2026
we’ll get rid of this experimental flag.