Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars1🌍 Public
JJasmine Ye Han
Last edited Dec 29, 2021
Created on Dec 24, 2021

A React component renders an SVG circle that follows the mouse cursor across a 960-by-500 viewport. The app uses React's `useState` and `useCallback` hooks to track mouse coordinates from the `onMouseMove` event, passing the updated position to the circle's `cx` and `cy` attributes. The visualization demonstrates basic event handling and state-driven SVG rendering in React.

AI-generated description

A program that follows your mouse with a circle.

Comments

Sign in to join the discussion.

MIT Licensed