Skip to main content
100%

Mouse Follower

✓ Published0🌍 Public
Llatifiss
Last edited Jul 31, 2022
Created on Jul 31, 2022

A small circle tracks the mouse cursor in real time across a fixed 960 by 500 SVG canvas. The visualization demonstrates how React state manages interactive updates: each mousemove event on the SVG element updates the mouse position, which is then used to set the circle’s cx and cy attributes. It uses React’s useState and useCallback hooks to handle state and event logic, with the circle’s initial position at the canvas center.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes