Fork of Mouse Follower
✓ Published0🌍 Public
A React component renders an interactive SVG visualization that follows the mouse cursor with a circle. Using the `useState` and `useCallback` hooks, it tracks `clientX` and `clientY` coordinates from SVG `onMouseMove` events, updating the circle’s `cx` and `cy` attributes. The circle has a fixed radius of 50 pixels within a 960×500 viewport, with its initial position at the center. The code loads React and ReactDOM from CDN, demonstrating a simple state-driven rendering loop without external data sources.
AI-generated descriptionA program that follows your mouse with a circle.
MIT Licensed