Skip to main content
100%

Load data with React and D3

✓ Published1🌍 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.

MIT Licensed

Similar vizzes