Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse follower

Public visualization

Viewing a saved revision (read-only)

30e69221c12a47e8a9204e4b17353b96

Mouse follower

0 stars0🌍 Public
CChrisGaul
Last edited Sep 29, 2021
Created on Sep 29, 2021

A yellow circle follows the mouse cursor across a blank SVG canvas, updating its position in real time as the pointer moves. The visualization demonstrates a simple React component using the `useState` and `useCallback` hooks to manage and update the circle’s center coordinates, while D3 v5 is loaded via a script tag but not directly used for rendering. Mouse events are captured on the SVG element via `onMouseMove`, and the circle’s `cx` and `cy` attributes are bound to the stored position state.

AI-generated description

Smiley face implementation with React & D3.