onMouseDown and onMouseUp Event handling in ReactJs
When user press the mouse button down, a mousedown event is triggered, and when user release, a mouseup event is triggered. The handleEvent method uses the type property to determine which event is being handled and updates the message value accordingly.
https://www.golangprograms.com/onmousedown-and-onmouseup-event-handling-in-reactjs.html