🌍 Public
Viewing a saved revision (read-only)
57e6c574f93649f9a622fe91d0064b09
Mouse follower
A single circle follows the mouse cursor across an SVG canvas, responding in real time to pointer movement. The example demonstrates integrating D3.js with React hooks, using React's `useState` to track mouse coordinates and `useCallback` to handle the `mousemove` event. D3's `arc` API is imported but not used in the visible logic. The circle's position updates directly from the browser's `clientX` and `clientY` values, rendered as a simple SVG `<circle>` element without animation or data binding.
AI-generated descriptionA program that follows your mouse with a circle