Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars1🌍 Public
Nnkohdatavis
Last edited Jul 21, 2020
Created on Jul 21, 2020
Forked from Mouse Follower

A circle follows the mouse cursor across an SVG canvas. The visualization demonstrates React's state management with D3's event handling, using a `useState` hook to track cursor coordinates and a `useCallback` hook to efficiently update the circle's `cx` and `cy` attributes on every mouse move. The D3 v5 library renders the SVG element.

AI-generated description

React Starter code.

Comments

Sign in to join the discussion.

MIT Licensed