You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am leaving this post because I wonder what it would be like if there was a mutation to prevent duplicate processing.
In the case of a currently existing mutation, you can prevent duplicate processing with the isPending status value.
However, since this is managed through setState in the React query internal code, a problem occurs in which duplicate processing is not performed properly.
Problems often arise when duplicate requests are made, such as payment buttons. What if there was a mutation that completely solved this problem?
I created a custom mutation that receives the requestId value and handles duplicate requests using it.
I’m telling you this because I wonder what it would be like if it were built into React Query.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
hello.
I am leaving this post because I wonder what it would be like if there was a mutation to prevent duplicate processing.
In the case of a currently existing
mutation
, you can prevent duplicate processing with theisPending
status value.However, since this is managed through
setState
in the React query internal code, a problem occurs in which duplicate processing is not performed properly.Problems often arise when duplicate requests are made, such as payment buttons. What if there was a mutation that completely solved this problem?
I created a custom mutation that receives the
requestId
value and handles duplicate requests using it.I’m telling you this because I wonder what it would be like if it were built into React Query.
- useSingleRequest.ts
- useSingleRequestMutation.ts
- Component.tsx
Beta Was this translation helpful? Give feedback.
All reactions