🌍 Public
Viewing a saved revision (read-only)
2b614dd5d042465c8707a95706289c19
Mouse Follower
A circle follows the mouse cursor across a full-screen SVG canvas, updating its position in real time as the pointer moves. The React app uses the `useState` hook to store the current mouse coordinates and the `useCallback` hook to define a `handleMouseMove` event handler, which reads `clientX` and `clientY` from the synthetic event. The circle, with a fixed radius of 30 pixels, is rendered via SVG’s `<circle>` element, whose `cx` and `cy` attributes are bound to the state, and the window’s dimensions determine the viewport size.
AI-generated descriptionA program that follows your mouse with a circle