Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of MouseFollower

Public visualization

Fork of MouseFollower

0 stars1🌍 Public
SScott Kanning
Last edited Apr 18, 2024
Created on Apr 18, 2024

A React component renders an SVG circle that follows the mouse cursor across the full browser window. The circle's position updates on every mouse move via React's `useState` and `useCallback` hooks, with the `clientX` and `clientY` event coordinates passed directly to the SVG `cx` and `cy` attributes. The visualization demonstrates real-time event handling in a React-SVG setup, using `ReactDOM.render` to mount the root element.

AI-generated description

Program follows mouse with circle

Comments

Sign in to join the discussion.

MIT Licensed