🌍 Public
Viewing a saved revision (read-only)
8155ac1ec4704523bdcabef3414e11ad
Mouse follower
A React-controlled SVG circle follows the user's mouse position across a 960×500 canvas, updating its coordinates on every `mousemove` event via the `useState` and `useCallback` hooks. The code imports `arc` from D3 v5 but does not use it, relying instead on React's synthetic event handling and direct SVG attribute updates. The circle’s center is bound to `mousePosition`, with an initial default at the canvas midpoint, and the page hides browser scrolling for a focused interactive demonstration.
AI-generated descriptionMouse follower