Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

c4f48464b9c74c10b0071bdb6595858b

Mouse Follower

0 stars1🌍 Public
TTakuya Kitazawa
Last edited Jan 12, 2021
Created on Jan 12, 2021

A full-window SVG circles a crosshair that tracks the mouse cursor. A React component uses the `useState` and `useCallback` hooks to store and update the pointer's `clientX` and `clientY` coordinates on every `onMouseMove` event. The circle’s center position is bound directly to these state values, and React re-renders the SVG element instantaneously as the user moves the mouse.

AI-generated description

Mouse follower.