🌍 Public
Viewing a saved revision (read-only)
21ad9cccc01247178dde031ca8612969
circle and mouse
A circle follows the mouse cursor inside an SVG canvas. The example demonstrates React's state management and event handling by updating the circle's center coordinates on every mouse move. Built with React 16.9 and ReactDOM, it uses the `useState` hook to store the mouse position and the `onMouseMove` event to update it. The circle's `cx` and `cy` attributes are bound directly to the state, causing the SVG to re-render responsively.
AI-generated descriptionSmiley face implementation with React.