A React Hook to create a function that can be used to ensure that only one is running at a time, and provides an additional invalid operation callback function.
Quickly and repeatedly click the button to check the effect.
See API for more details.
Click links below to view source on GitHub.
A function that returns a promise.
A function that will be called when the function is locked and is called again.
A function that can be used to ensure that only one is running at a time, return a promise that resolves the return value of the async function or the return value of the invalid operation callback function.