Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
OOlowogoke Seun
Last edited Sep 30, 2021
Created on Sep 30, 2021

A black circle follows the mouse as it moves across a blank SVG canvas. The example demonstrates React state management with the `useState` and `useCallback` hooks to track cursor coordinates. Each mouse movement updates the circle’s `cx` and `cy` attributes, while d3.v5 is loaded but not used in the visible logic. The SVG rendering is handled by React, with the circle’s position initialized at the canvas center.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes