Replies: 2 comments 4 replies
-
can you show a reproduction? The query shouldn't run if it only has disabled observers. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I think I found the root of the issue, can you confirm if what I say is true? When the enabled property is false, the query does not run, but then the data property returns null. |
Beta Was this translation helpful? Give feedback.
4 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.
-
Hi,
I am using react-query and I am trying to understand why my query is running even if the enabled property is false.
The flow is the following:
Is this the correct behaviour of react-query?
This is my code:
QUERY
UseEffect that runs when loading the query, and sets the variable to false
The variable is changed from a button on click and its a simple SetState Function.
Thanks!
Feel free to answer here as well: https://stackoverflow.com/questions/74972004/enabled-property-of-usequery-only-works-the-first-time-react-query
Beta Was this translation helpful? Give feedback.
All reactions