Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

fb14836a44d74e05980f13c2a73e5193

Mouse Follower

0 stars1🌍 Public
AArookie-2020
Last edited Jul 17, 2021
Created on Jul 16, 2021

A single dark circle tracks the mouse cursor across a blank SVG canvas. The example demonstrates how React state can drive D3 visualizations by updating the circle’s center coordinates on every mouse move. It uses React hooks, specifically `useState` and `useCallback`, to handle the `onMouseMove` event on the SVG element, while importing only the `arc` function from D3 v5, though the rendered output is purely a positioned circle.

AI-generated description

A program that follows your mouth with a circle