🌍 Public
Viewing a saved revision (read-only)
6dbbd7a9ff5e4c03a425034a8602a742
Mouse Follower
A single dark circle tracks the mouse cursor across a blank SVG canvas. The example demonstrates how React state can drive D3 visualizations by updating the circle’s center coordinates on every mouse move. It uses React hooks, specifically `useState` and `useCallback`, to handle the `onMouseMove` event on the SVG element, while importing only the `arc` function from D3 v5, though the rendered output is purely a positioned circle.
AI-generated descriptionA program that follows your mouth with a circle