🌍 Public
Viewing a saved revision (read-only)
389cf99d78574a0bb90cd3869e87f1b2
Mouse Follower
A yellow circle tracks the cursor across a 960 by 500 SVG canvas, updating its center position in real time. The React component uses the `useState` and `useCallback` hooks to manage mouse coordinates from the SVG `onMouseMove` event. Each pointer movement triggers a state update, which re-renders the circle’s `cx` and `cy` attributes via ReactDOM’s declarative rendering.
AI-generated descriptionA program that follows the mouse with a circle.