Open
Description
Describe the bug
When using the latest version of tanstack-query you get at least in solidjs for each query this error message in the console:
Uncaught (in promise) Error: experimental_prefetchInRender feature flag is not enabled
Your minimal, reproducible example
https://codesandbox.io/p/github/BierDav/temp-tanstack-query-ssr-bug/experimental-flag-warning
Steps to reproduce
- Just start it using
bun i && bun dev
Expected behavior
No error message in the console, because the promise
wasn't even accessed
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
- OS: Windows, Linux
Tanstack Query adapter
solid-query
TanStack Query version
v5.59.13
TypeScript version
No response
Additional context
I have looked into the code. It is not really that something went wrong, and more about that the promise which causes this issue is evaluated even though the feature is not set.
Probably the easiest solution is to replace the promise when the flag is not enable with a getter
function which then only throws the error, when the promise is really accessed.