Replies: 1 comment 4 replies
-
you will unmount your app and replace it with a loading spinner on every background refetch (e.g. a window focus after staleTime is reached), which is most likely not what you want. So no, it's likely not the desired behaviour.
the disabled queries are kind of a hybrid - they don't have data, but they are also not currently getting any data. That's why we previously had the Also, So my question would be: what are you currently rendering in case of
If you want a 1:1 replacement of checks, the migration guide shows how to achieve that: - status: 'idle'
+ status: 'loading'
+ fetchStatus: 'idle' so you would need to check for |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I encountered this issue: #3584, and I fixed it by using
isFetching
.But I don't understand the rationale and I think it violates the principle of least surprise. If it's to only have 3
state
s, wouldn't it be better for disabled queries to be in thesuccess
state instead of theloading
state?Also there are a few places on the documentation that I think contradict this change:
in https://tanstack.com/query/v4/docs/reference/useQuery in
status: String
it says:in https://tanstack.com/query/v4/docs/guides/queries
I would argue that for most queries
isFetching
behavior is desiredBeta Was this translation helpful? Give feedback.
All reactions