How to restart/reset refetchInterval? #5613
Replies: 2 comments 6 replies
-
|
Beta Was this translation helpful? Give feedback.
-
Sure, but I would like to restart the interval not dependent on this fetch, but another fetch(a post/mutation actually). So there is a fetch/query with a refetchInterval using various conditions in the refetchInterval method. And there is a post-button, if that button was clicked, I need the refetchInterval to be restarted. The refetchInterval method only makes a decision possible how long until refetch (based on the fetched data), but not a possible restart of the refetch counter. |
Beta Was this translation helpful? Give feedback.
-
In our current project, we need to restart the refetchInterval of a query under specific conditions. The api does not seem to provide a way to do this currently. Or is there a way already? If not, please provide a way here, for example using the queryClient instance, like "queryClient.resetRefetchInterval(key)".
Beta Was this translation helpful? Give feedback.
All reactions