Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
BBrittany Harden
Last edited Dec 9, 2022
Created on Dec 9, 2022

A single dark circle follows the mouse cursor across an SVG canvas. The visualization demonstrates a basic interactive pattern using React state and event handling. The `App` component tracks the cursor's `clientX` and `clientY` coordinates through an `onMouseMove` handler, updating the circle's `cx` and `cy` attributes. The application uses React's `useState` and `useCallback` hooks to manage position updates efficiently, rendering the result through ReactDOM with a fixed 960 by 500 pixel viewport.

AI-generated description

A program that follows your mouse with a circle.

Directions: https://www.youtube.com/watch?v=9zzIwsASgeo&list=PL9yYRbwpkykuK6LSMLH3bAaPpXaDUXcLV&index=15

MIT Licensed

Similar vizzes