🌍 Public
Viewing a saved revision (read-only)
9450bd4af0ea4d4b97e2368dee46ad5d
Mouse Follower
A React component renders an SVG circle that tracks the mouse cursor across a 960-by-500 viewport. The circle’s position updates in real time through React’s `useState` hook and an `onMouseMove` event handler on the `<svg>` element, which captures the cursor’s `clientX` and `clientY` coordinates. The example demonstrates interactive SVG rendering with React 16.9, using the `ReactDOM.render` method to mount the application, and relies on a production build from unpkg. The circle maintains a fixed radius of 30 pixels while following the pointer.
AI-generated descriptionA program that follows your mouse with a circle.