🌍 Public
Viewing a saved revision (read-only)
061e01af45cf42a181aa9288cb9e6ca8
Mouse Follower
A full-screen SVG circle tracks the mouse in real time. It demonstrates React state management and event handling by updating the circle’s coordinates on every pointer movement. The application uses React’s `useState` and `useCallback` hooks within a functional component, rendering a single `<circle>` element inside an `<svg>` that covers the viewport. The `onMouseMove` event triggers a state update with the cursor’s `clientX` and `clientY` positions, causing React to re-render the circle at the new location.
AI-generated descriptionA program that follows your mouse.