Skip to main content
100%

React Mouse Follower

✓ Published0🌍 Public
HHamza Abdirashid
Last edited Jul 2, 2021
Created on Jun 25, 2021
Forked from Hello VizHub

A React component renders an SVG circle that follows the mouse cursor across a 960×500 viewing area. The application uses React’s `useState` and `useCallback` hooks to track mouse coordinates via an `onMouseMove` event handler on the SVG element, updating the circle’s `cx` and `cy` attributes in real time. D3 v5 is loaded but not directly used; rendering relies solely on React’s declarative SVG output with a fixed 100-pixel radius circle.

AI-generated description

react app that makes an svg circle follow the mouse

MIT Licensed

Similar vizzes