Mouse Follower
✓ Published0🌍 Public
A yellow circle follows the mouse cursor across a full-screen SVG canvas, using React state to track and render its position. The app listens for `mousemove` events on the SVG element, extracting `clientX` and `clientY` coordinates via `useCallback` and updating the circle’s `cx` and `cy` attributes through `useState` and `ReactDOM.render`. This demonstrates a simple interactive pattern with React’s declarative rendering and SVG’s coordinate system.
AI-generated descriptionA program that follows your mouse with a circle.
MIT Licensed