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