Is it intended that refetch is not affected by enabled? #7907
-
here is reproduction I'm using v4.36.1 and even if I refetch, if enabled is false, I expected fetching would not be done However, regardless of enabled, fetch was done. Do I need to add enabled conditions directly when calling refetch? this issue says that this problum has been resolved since v4, but the problem still occurs |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
https://tanstack.com/query/v5/docs/framework/react/guides/disabling-queries
|
Beta Was this translation helpful? Give feedback.
refetch
returned fromuseQuery
bypassesenabled
. That is documented here:https://tanstack.com/query/v5/docs/framework/react/guides/disabling-queries