React Query stops when component is not visible #1564
-
Hi, I have a modal with a button and an attached callback that closes the modal and then calls
Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
It could be that if that’s the case, you could try |
Beta Was this translation helpful? Give feedback.
It could be that
onSuccess
is not called because the subscriber has already unmounted. Can you create a reproduction in codesandbox?if that’s the case, you could try
queryClient.fetchQuery
rather thanrefetch