Mouse follower
✓ Published1🌍 Public
A single gray circle follows the mouse cursor across an SVG canvas. The example demonstrates how React state and event listeners coordinate with D3 rendering. The `App` component tracks pointer coordinates via an `onMouseMove` handler, storing them in `mousePosition` with `useState` and `useCallback`. On each update, React re-renders the circle using the new `cx` and `cy` properties. The visualization uses React 16.9 and D3 v6, importing only the `arc` function which remains unused in the final code.
AI-generated descriptionEvent listener and React state.
MIT Licensed