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
I am having issues with useLoaderData having its promise (from React Query) cancelled due to a useQuery / subscription sitting above the route in question that would like to access the infinite data once it is populated. This then ruins the suspense / await component functionality as errors are propagated.
This is just to display a little bit of info in the header that would come from the infinite data total records count.
I have tried every different way to access the local store and setting enabled: false and not providing a queryFn would seem like the answer but it still fires a query with then creates a local version of empty data which causes other issues when the real query is fired.
I would like a way to either totally disable a query from ever running until a condition, such as data existing / or an active query running elsewhere. There doesn't seem to be a way to achieve this.
Your minimal, reproducible example
Sorry
Steps to reproduce
Unable to build a working demo at the moment
Expected behavior
I would like a way to totally disable a query and just return undefined if no data is already populated.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
All platforms, all browsers
Tanstack Query adapter
react-query
TanStack Query version
^5.29.2
TypeScript version
5.4.5
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
I am having issues with useLoaderData having its promise (from React Query) cancelled due to a useQuery / subscription sitting above the route in question that would like to access the infinite data once it is populated. This then ruins the suspense / await component functionality as errors are propagated.
This is just to display a little bit of info in the header that would come from the infinite data total records count.
I have tried every different way to access the local store and setting enabled: false and not providing a queryFn would seem like the answer but it still fires a query with then creates a local version of empty data which causes other issues when the real query is fired.
I would like a way to either totally disable a query from ever running until a condition, such as data existing / or an active query running elsewhere. There doesn't seem to be a way to achieve this.
Your minimal, reproducible example
Sorry
Steps to reproduce
Unable to build a working demo at the moment
Expected behavior
I would like a way to totally disable a query and just return undefined if no data is already populated.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
All platforms, all browsers
Tanstack Query adapter
react-query
TanStack Query version
^5.29.2
TypeScript version
5.4.5
Additional context
No response
The text was updated successfully, but these errors were encountered: