🌍 Public
Viewing a saved revision (read-only)
c2b643b067594db09a1087cab9b749e0
Mouse Follower
A blue circle tracks the mouse cursor across a 960 by 500 SVG canvas. The circle follows the pointer's exact coordinates, which are captured from the `clientX` and `clientY` properties of the mouse-move event. Built with React and ReactDOM, the example uses the `useState` hook to store the cursor position and the `useCallback` hook to handle the `onMouseMove` event on the SVG element. The rendered SVG outputs a single circle whose center coordinates update dynamically with each mouse movement.
AI-generated description