Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Load data with React and D3

Public visualization

Viewing a saved revision (read-only)

489ea1b9dec7430685e4086dce925b7f

Load data with React and D3

0 stars1🌍 Public
Rrekabbnad
Last edited Jun 16, 2022
Created on Jun 16, 2022
Forked from MouthFollower

A React component renders an SVG circle that tracks the mouse position across a 960-by-500 viewport. Using React’s `useState` and `useCallback` hooks, the component updates its state on every `onMouseMove` event, passing the new `clientX` and `clientY` coordinates to the circle’s `cx` and `cy` attributes. The example demonstrates integrating React’s declarative rendering with SVG markup without relying on D3 for data loading or manipulation.

AI-generated description

a program that follows your mouse with a circle.