🌍 Public
Viewing a saved revision (read-only)
3269041a5faf4548ba5c972f1fc48e67
Mouse follower
A React component renders an SVG circle that follows the mouse pointer across a 960×500 viewport. On every mouse move, the `onMouseMove` event handler updates the circle’s `cx` and `cy` coordinates via React’s `useState` and `useCallback` hooks. The circle starts centered and has a fixed radius of 30 pixels. The example demonstrates interactive SVG rendering with React, using only ReactDOM and no external data or visualization libraries.
AI-generated descriptionA program that follows your mouse with a circle.