Skip to main content
100%

Mouse follower

✓ Published1🌍 Public
AAoibhinnRed
Last edited Oct 1, 2021
Created on Sep 29, 2021

A React component renders an SVG circle that follows the mouse cursor across a 960 by 500 pixel canvas. The circle starts at the center and updates its position on every `mousemove` event via React's `useState` and `useCallback` hooks. The `handleMouseMove` callback reads the event's `clientX` and `clientY` coordinates to set the new circle center, using ReactDOM to mount the app. No data source is involved; the visualization simply tracks pointer movement in real time.

AI-generated description

A program that follows your mouse on the screen.

MIT Licensed

Similar vizzes