🌍 Public
Viewing a saved revision (read-only)
5b460b798b1044fd93f4165b8260d1f9
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.