-
I have list of tasks and each task have mark as complete button using useMutation. I have created the button component with seperate useMutation inside it. The problem is onSuccess wont execute if user click mark as complete on next row before previous one finished. so is the isPending, it will set to false before onSucess execute to update the list. I used the isPending state to disable the button to prevent multiple click. the button component looks like this
the mutation hook
Any ideas how to solve this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
please show this in a minimal, executable reproduction. |
Beta Was this translation helpful? Give feedback.
please show this in a minimal, executable reproduction.