🌍 Public
Viewing a saved revision (read-only)
7aee17e3b2764083b2bc5fea52615ab7
mouse follower
A circle follows the mouse position inside an SVG canvas, updating its center coordinates in real time as the pointer moves. The React component uses the `useState` hook to track the mouse's `clientX` and `clientY` values, which are set through an `onMouseMove` event handler on the SVG element. The circle's radius is fixed at 30 pixels, and its position is rendered directly as SVG `cx` and `cy` attributes. The example demonstrates state-driven rendering with React 17 and DOM event handling without external data sources.
AI-generated descriptionprogram mouse follower with circla