use-click-coordinates
The usesClickCoordinates hook is for capturing click coordinates, this is useful when positioning a tooptip or creating visual effects
Module
Syntax
where:
ref
: node reference to observe the click event.
handlerClick
: Callback that receives the coordinates of the click event.
Coordinates
Where :
offset.x : MouseEvent.offsetX
offset.Y : MouseEvent.offsetY
Example