Polling onSuccess in version 5 #6402
-
When version 5 removed the callbacks, I actually managed to make my code a lot better in most cases. There are specific APIs that take a long time to do something, so we send a POST and start polling on a progress service to see the progress and show it to the user. What's the right thing to do here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
useEffect is fine, you could also do in the queryFn of the polling query if you want to avoid the effect |
Beta Was this translation helpful? Give feedback.
useEffect is fine, you could also do in the queryFn of the polling query if you want to avoid the effect