Mouse Follower
✓ Published1🌍 Public
A React component renders a yellow circle that follows the mouse cursor within an SVG canvas. The circle’s position is updated via React state, driven by the SVG’s `onMouseMove` event handler, which captures `clientX` and `clientY` coordinates. The example demonstrates interactive SVG rendering with React hooks (`useState`, `useCallback`) and `ReactDOM.render`. The circle starts centered in the 960×500 viewport and moves responsively with the pointer.
AI-generated descriptionA program that follows your mouse with a circle.
MIT Licensed