Mouse Follower
✓ Published0🌍 Public
A single black circle tracks the mouse across an SVG canvas, smoothly following the cursor’s exact screen coordinates in real time. The React component uses the `useState` hook to store the mouse position and a `useCallback` handler for `onMouseMove` events, updating the circle’s `cx` and `cy` attributes. Rendering is handled by ReactDOM, with D3’s `arc` import available but unused. The minimal interaction demonstrates how React state and SVG event binding can create responsive pointer-driven visuals.
AI-generated descriptionA program that follows your mouse.
MIT Licensed