React
I love the web, we can do anything. But well... sometime it feels like we have to do EVERYTHING.
These are pieces of code you will find useful for a React web app. Do not bother looking for a library, just copy and paste these components code.
When you click on this component, it starts a timer. If you click a second time quickly, we register a double click. If the timer ends and the user clicked once then we register a single click. Simple.
The tricky part is to find the right balance for the timeout.
With a shorter timeout:
With a longer timeout:
I use this for quick prototypes, when I want to store user inputs without taking out a database immediately.
I use it whena.re too: if you have not visited the Slack Integration page you will see a notification badge in the navbar. It is simple and it does not require an account.
The only limitation is due to privacy feature in some browser which might break it.