Fetch Data Conditionally #2195
Unanswered
arslanalidev
asked this question in
Q&A
Replies: 1 comment 5 replies
-
stale queries get re-fetched in the background when a new subscriber mounts. set a |
Beta Was this translation helpful? Give feedback.
5 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 am using the same component for two routes. Now I want to trying the fetch the data through react query with specific route. I had enabled it conditionally with enabled flag in react query options. After that when I go the other route but same using the same component it's still fetching the data. Now I had the question how we can achieve this functionality. Means on specific route it should be disabled and when we go to other route it should re-enable it.
Beta Was this translation helpful? Give feedback.
All reactions