Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars1🌍 Public
YYee Han
Last edited Dec 22, 2020
Created on Dec 22, 2020

A circle follows the user's mouse cursor across an SVG canvas. The visualization uses React's `useState` and `useCallback` hooks to track the latest mouse coordinates and render a circle at that position. The circle's center updates on every mouse movement event, creating a direct and immediate visual response. The example is built with React 16.9.0 and ReactDOM to manage the SVG rendering and state updates.

AI-generated description

A program that follows your mouse with a circle

Comments

Sign in to join the discussion.

MIT Licensed