Is there a way to use useMutation with debounce?
Hi,
I'm trying to prevent user from spamming with likes, is there a way to show optimistic updates without actually sending the mutation request?
Thanks 🙂
2 Replies
other-emerald•3y ago
I'm not aware of anything that will let you debounce mutations in react query.
Your best bet is probably debouncing and updating the UI yourself and then finally calling
mutate(idsOfPostsToLike)sensitive-blueOP•3y ago
Thanks a lot! 🙏