🌍 Public
Viewing a saved revision (read-only)
b46be39ad821445d839ca28c3be5f26b
Mouse Follower
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.