Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse follower

Public visualization

Viewing a saved revision (read-only)

3269041a5faf4548ba5c972f1fc48e67

Mouse follower

0 stars1🌍 Public
CChristian Potdevin
Last edited Mar 21, 2021
Created on Mar 21, 2021

A React component renders an SVG circle that follows the mouse pointer across a 960×500 viewport. On every mouse move, the `onMouseMove` event handler updates the circle’s `cx` and `cy` coordinates via React’s `useState` and `useCallback` hooks. The circle starts centered and has a fixed radius of 30 pixels. The example demonstrates interactive SVG rendering with React, using only ReactDOM and no external data or visualization libraries.

AI-generated description

A program that follows your mouse with a circle.