mouse follower
✓ Published0🌍 Public
A circle follows the mouse cursor across a full-screen SVG canvas. The example demonstrates state tracking in React: the `useState` hook holds the cursor’s x and y coordinates, while `useCallback` updates that state on every `onMouseMove` event. The circle’s `cx` and `cy` attributes are bound directly to the stored position, so it re-renders instantly. D3 is not used for drawing or data loading here; the interaction relies entirely on React and native SVG elements, with no external data source.
AI-generated descriptionMouse follower with a circle, use react to track state, use d3 to load data.
MIT Licensed