T
TanStack3y ago
rival-black

Limiting Concurrent Mutations

Is there a way to limit the number of concurrent mutations on the same mutation variable? I know I can build in UI & server logic to limit it. But for example... a user might click a button and it takes a second to process. And during that time they might mash the button a few more times causing many requests. I do have some logic built in to prevent this client side, but is there something that react-query can do to limit the number of mutation calls?
2 Replies
eastern-cyan
eastern-cyan3y ago
no, there is no limit. you'd have to disable the button yourself depending on the loading state of the mutation
rival-black
rival-blackOP3y ago
Aight, thats what im doing. Thanks!

Did you find this page helpful?