Mouse Follower
✓ Published0🌍 Public
A yellow circle follows the mouse cursor inside an SVG canvas. The example demonstrates React state management with a `useState` hook to track the cursor's `clientX` and `clientY` coordinates, updating on every `onMouseMove` event. The app renders a single `<circle>` element with a radius of 30, initially centered at a fixed midpoint, and uses React's `useCallback` to optimize the handler. Built with React 16.9 and D3 v5, the rendering relies entirely on SVG output without external data sources.
AI-generated descriptionA program that follows your mouse with a circle
MIT Licensed