Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
Jjwesterlund412
Last edited Dec 29, 2021
Created on Dec 29, 2021

A React component renders an SVG circle that tracks the mouse position across a 960×500 canvas. The App uses the useState and useCallback hooks to store and update the cursor’s clientX and clientY coordinates on every mousemove event. The circle’s cx and cy attributes are bound to this state, making it follow the pointer in real time. The rendering relies on ReactDOM and SVG elements, with no external data sources beyond user interaction.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes