tRPCttRPC
Powered by
Alfonso GuerraA
tRPCβ€’7mo agoβ€’
1 reply
Alfonso Guerra

Migrating v11 from classic client to TanStack Query: β€œError: experimental_prefetchInRender feature ”

My code was working using the classic React client, but the shiny new feature set promised virility and good looks. But when I call useQuery() on my API, it's returning a rejected promise with the error message "Error: experimental_prefetchInRender feature flag is not enabled". Why does it think I requested a prefetch, and how do I correct the code so it doesn't request a prefetch?

I asked Copilot and got this response:



which is contrary to the instructions on https://trpc.io/docs/client/tanstack-react-query/migrating.

I got a similar response from Amazon Q:

I need to know why TQ thinks I'm trying to do a prefetch, and how to correct my code so it doesn't get rejected anymore.

Many thanks in advance πŸ™
copilot-prefetchInRender.png
Screen_Shot_2025-07-19_at_06.57.32.png
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

v11 with tanstack mutation not invalidate query
-3est[P]---3est[P]- / ❓-help
12mo ago
optimistic updates tRPC v11 + TanStack Query v5
SparkSSpark / ❓-help
3y ago
v11 incompatible with `@tanstack/react-query` > 5.59.9
jlarmstJjlarmst / ❓-help
17mo ago
tRPC v11 with Tanstack React Query - queryOptions/mutationOptions methods missing
lassiterLlassiter / ❓-help
7mo ago