useMouse
About
Description
Mouse position hook for React.
Return value
useMouse returns a single object containing the mouse position.
Returned object attributes | Type | Description |
---|---|---|
x | int | X position of mouse |
y | int | Y position of mouse |
Mouse position hook for React.
useMouse returns a single object containing the mouse position.
Returned object attributes | Type | Description |
---|---|---|
x | int | X position of mouse |
y | int | Y position of mouse |