🌍 Public
Viewing a saved revision (read-only)
91c9dec2eae9478d81f8c7173c01d7a4
Fork of React Starter
This example demonstrates a React component that renders an interactive SVG circle. The circle follows the mouse cursor across a 960-by-500 viewport, updating its position in real time through React state management. The code uses React hooks (`useState`, `useCallback`) to track mouse coordinates and re-render the circle on every `onMouseMove` event. The SVG circle is rendered with a fixed radius of 30 pixels, and the initial mouse position is set to the center of the viewport. The project relies on React 16.13.1 and ReactDOM for rendering the component into the DOM.
AI-generated descriptionReact Starter code.