Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Mouse Follower

Public visualization

Fork of Mouse Follower

0 stars0🌍 Public
RRichard Yim
Last edited May 17, 2021
Created on May 17, 2021
Forked from Mouse Follower

A single gray circle follows the mouse cursor across an SVG canvas. The example demonstrates React state management with the `useState` and `useCallback` hooks, updating the circle’s `cx` and `cy` attributes on every `mousemove` event. React renders the SVG element directly, with the circle’s position derived from the client coordinates of the pointer. The visualization uses React 16.9 and ReactDOM, keeping the interaction simple and responsive without additional data sources or animation libraries.

AI-generated description

A program that follows your mouse with a circle.

Comments

Sign in to join the discussion.

MIT Licensed