Skip to main content
100%

Mouse Follower Refactor

✓ Published0🌍 Public
AAndrewLamWARC
Last edited Oct 22, 2021
Created on Oct 22, 2021
Forked from Mouse Follower

This example demonstrates a circle that tracks the user’s mouse movements across an SVG canvas, updating its position in real time. Using React’s `useState` and `useCallback` hooks, the app captures `clientX` and `clientY` coordinates from the `onMouseMove` event and passes them as `cx` and `cy` attributes to the circle element. The rendering relies on React 16.9 and ReactDOM, with no additional data sources or visualization libraries involved.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes