You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The official documentation describing the enabled option :
When enabled is false:
...
The query will ignore query client invalidateQueries and refetchQueries calls that would normally result in the query refetching.
But In my project queryClient.refetchQueries(queryKey) refetches disabled queries。
Your minimal, reproducible example
none
Steps to reproduce
Create a query with useQuery and set enabled option to false.
Create a queryClient with useQueryClient.
Invalidate this query with refetchQueries.
Expected behavior
The disabled queries (enabled: false) would notrefetch when I use refetchQueries
How often does this bug happen?
No response
Screenshots or Videos
No response
Platform
OS: macOs
Browser: Not related
react-query version
^3.39.2
TypeScript version
^4.7.4
Additional context
No response
The text was updated successfully, but these errors were encountered:
@TkDodo I'm not sure how much effort it might be and how many issues after it might bring. I'll go through the migration guide first then. But yeah, we would like to migrate anyway.
Describe the bug
The official documentation describing the enabled option :
But In my project queryClient.refetchQueries(queryKey) refetches disabled queries。
Your minimal, reproducible example
none
Steps to reproduce
query
withuseQuery
and setenabled
option tofalse
.queryClient
withuseQueryClient
.query
withrefetchQueries
.Expected behavior
The disabled queries (
enabled: false
) would notrefetch
when I userefetchQueries
How often does this bug happen?
No response
Screenshots or Videos
No response
Platform
OS: macOs
Browser: Not related
react-query version
^3.39.2
TypeScript version
^4.7.4
Additional context
No response
The text was updated successfully, but these errors were encountered: