🌍 Public
Viewing a saved revision (read-only)
6a58ae28849042acbe72055dca29206c
Fork of Mouse follower
This React and SVG example displays a single circle that follows the mouse cursor across a 960 by 500 canvas. The circle’s position updates in response to mouse movement events, initially centered on the screen. The application uses React’s `useState` and `useCallback` hooks to manage the cursor coordinates, and ReactDOM renders the SVG element with an `onMouseMove` handler. The visualization demonstrates real-time interaction by directly mapping the cursor’s client coordinates to the circle’s `cx` and `cy` attributes.
AI-generated descriptionInteraction with React - A program that follows your mouse with a circle.