Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars0🌍 Public
ZZach Herwitz
Last edited Jul 5, 2021
Created on Jul 5, 2021

A React application renders an SVG circle that follows the mouse cursor across a 960-by-500 canvas. The circle’s position updates via React’s `useState` and `useCallback` hooks, triggered by the SVG’s `onMouseMove` event, which passes `clientX` and `clientY` coordinates. The circle starts at the center and moves smoothly with pointer movement, demonstrating reactive state-driven rendering without any external data source.

AI-generated description

A program that follows your mouse with a cicle

Comments

Sign in to join the discussion.

MIT Licensed