🌍 Public
Viewing a saved revision (read-only)
d3f00530435a457b9792363ace0a9b06
Mouse Follower
A React application renders a single SVG circle that follows the mouse cursor across the full browser window. The component tracks pointer coordinates via React's `useState` and `useCallback` hooks, updating the circle's `cx` and `cy` attributes on every `onMouseMove` event. The viewport dimensions come from `window.innerWidth` and `window.innerHeight`, with the circle initially centered before the first mouse movement. The example demonstrates reactive state-driven SVG updates in a React 16.9 environment.
AI-generated descriptionA program that follows your mouse with a circle