Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Mouse Follower

Public visualization

Viewing a saved revision (read-only)

04d8c0bae98f45deb9b0b86938b02434

Fork of Mouse Follower

0 stars0🌍 Public
Bbriangregoryholmes
Last edited Dec 22, 2022
Created on Dec 22, 2022
Forked from Mouse Follower

A React application renders a single circle at the center of an SVG canvas, which then follows the user's cursor in real time. The component tracks mouse coordinates through a `handleMouseMove` callback that updates state with each pointer movement, re-rendering the circle's `cx` and `cy` attributes. It uses React 16.9's `useState` and `useCallback` hooks within a functional component, with the SVG's `onMouseMove` event driving the position updates. The visualization demonstrates simple state-driven interaction without external data sources or animation libraries.

AI-generated description

A program that follows your mouse with a circle.