🌍 Public
Viewing a saved revision (read-only)
df773172c0a64b53a3865110c9daaf5e
Mouse Follower
A small circle tracks the mouse in real time across a full-window SVG canvas. The React component stores the pointer’s coordinates in state via `useState` and updates them on every `mousemove` event through `useCallback`. The circle’s `cx` and `cy` attributes are bound directly to the current mouse position, re-rendering on each movement. The example uses React 16.9 with `ReactDOM.render`, an SVG with inline event handling, and no external data source or animation library.
AI-generated descriptionA program that follows your mouse with a circle.