status
should not be success
when passing a falsy query key
#426
-
Currently when passing a falsy query key (or if the query is manual), The use case is just knowing whether the query was successfully fetched. ProposalWould you be open to proposing a new status, something like States:
Current WorkaroundsI think in order to actually know whether a query has been invoked and was successful for sure with the way things currently are, we'd need to track |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Beta Was this translation helpful? Give feedback.
-
Thanks, I already have a fix for our use cases, good to know! Feel free to
close or leave open until resolved in v2.
Aside: is there details anywhere about what to expect in v2? Exciting!
…On Thu, Apr 30, 2020, 10:44 AM Tanner Linsley ***@***.***> wrote:
- The next major version of React Query will have this missing idle
state. It's a breaking change, so I'm not taking it lightly or rushing it.
- You can work around this by wrapping useQuery, detecting this state,
and decorating the return value to have it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#426 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEJU23RADAVIKGVUJFAARLRPGMG3ANCNFSM4MVWHX6A>
.
|
Beta Was this translation helpful? Give feedback.
idle
state. It's a breaking change, so I'm not taking it lightly or rushing it.