Disable Duplicate Prototype Submissions While Busy
@prranitarora▲ 9 net votes
Prevent a second submission while the first request is still processing, and show that the action is underway. This avoids accidental duplicate records and gives the user clear feedback.
7 COMMENTS
- @mrnarwhal55▲ 2
Informative
- @hk3narwhal▲ 2
Insightful
- @narwhalix▲ 2
Wise
Fundamental
Valid
Awesome
Disabling the button after the first click may not stop a quick second submit, because
setStateupdates are asynchronous. Guard the handler with a ref or a flag that is set synchronously. Got a different fix? Post it in the comments.