Mouse Follower
✓ Published1🌍 Public
A yellow circle follows the mouse cursor inside an SVG canvas, updating its position in real time to mirror the pointer’s coordinates. The example demonstrates React’s `useState` and `useCallback` hooks to manage the cursor’s x and y values, while the `onMouseMove` event on the SVG element triggers the state update. Rendered using React DOM with D3 v5, the circle’s radius is fixed at 30 pixels, and its center is bound to the tracked mouse position.
AI-generated descriptionA program that follows your mouse with a circle
MIT Licensed