DEV Community

Aurélien Delogu
Aurélien Delogu

Posted on • Edited on

Code Snippet: How to avoid calling a function twice until its task has finished

Top comments (1)

Collapse
 
pyrsmk profile image
Aurélien Delogu

For example, this is especially useful for applications that wait for callbacks that usually have a tiny waiting time, to avoid losing time implementing routines to block/unblock a button (which requires styling, possible more HTML tags, additional JS code, etc...).