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
If fetching a query and then checking for isError and isLoading and return if either, the data keyword can still be undefined while isLoading is the same as isFetching && isPending according to the docs.
So if you add an and operation it still needs to be defined.
Describe the bug
If fetching a query and then checking for
isError
andisLoading
and return if either, thedata
keyword can still be undefined whileisLoading
isthe same as isFetching && isPending
according to the docs.So if you add an
and
operation it still needs to be defined.Your minimal, reproducible example
https://codesandbox.io/p/sandbox/msy6g5?file=%2Fsrc%2FApp.tsx%3A23%2C30
Steps to reproduce
Hover the type inference.
Expected behavior
The type should not have undefined
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Linux
Tanstack Query adapter
react-query
TanStack Query version
5.69.0
TypeScript version
5.7.2
Additional context
No response
The text was updated successfully, but these errors were encountered: