🌍 Public
Viewing a saved revision (read-only)
626bfedb7681400c9fd24b606d5d5aee
FCC: Mouse follower using React
A single black circle follows the mouse cursor across a full-window SVG canvas. The React component tracks pointer coordinates via an `onMouseMove` handler, storing them in state with the `useState` hook and updating them through a `useCallback`-wrapped event listener. The circle’s `cx` and `cy` attributes are re-rendered with each mouse movement, using the viewport dimensions from `window.innerWidth` and `window.innerHeight`. The example demonstrates React’s declarative UI updates for interactive SVG visualizations.
AI-generated descriptionFCC: Mouse follower using React