Replies: 1 comment 8 replies
-
if both queries share the same query key then yes, this is expected. You'll also get the So |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have two components that loads the same data and shares query key but one does it "on demand" by mounting
useQuery
withoptions.enabled
set tofalse
.I however gets
status
success
even ifoptions.enabled
isfalse
.If this is expected…
How to "fix it"?
queryResult.refetch()
the only alternative here?https://codesandbox.io/s/react-query-on-demand-fcj6hy?file=/src/App.js
Beta Was this translation helpful? Give feedback.
All reactions