Skip to content
Discussion options

You must be logged in to vote

If enabled is falsy & cached data exists, is it possible for the query result to initialize in an idle state, and then when refetch is invoked, it will immediately resolve to a success state if there is cached data?

no, it's not. The state gives information about data. loading means there is no data yet, as does idle. success means you have data. You can also be fetching while you are in success state if a background refetch happens.

FYI, in v4, the idle state will be removed, see: https://react-query-alpha.tanstack.com/guides/queries

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jxom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants