🌍 Public
Viewing a saved revision (read-only)
593c4e2126d144fab5ec88418821a146
React Mouse Follower
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 descriptionreact app that makes an svg circle follow the mouse