Fork of Mouse Follower
✓ Published0🌍 Public
A gray circle follows the mouse cursor across a blank SVG canvas, updating its position with every pointer movement. The React component tracks the cursor’s clientX and clientY coordinates via the onMouseMove event, storing them in state and re-rendering the circle’s cx and cy attributes. The visualization uses React 16.9’s useState and useCallback hooks inside a functional component, rendering the shape through ReactDOM into an SVG element sized 960 by 500 pixels.
AI-generated descriptionA program that follows your mouse with a circle.
MIT Licensed