🌍 Public
Viewing a saved revision (read-only)
6ff51ba5adae4c5aa53f6b99f32329f0
Mouse Follower
A circle follows the mouse cursor across a full-window SVG canvas. Built with React, the app tracks pointer coordinates through an SVG `onMouseMove` handler, stores them in state with the `useState` hook, and updates the circle's `cx` and `cy` attributes on every move. The `useCallback` hook memoizes the event handler for efficiency, while the initial mouse position is centered on the screen. Rendering uses ReactDOM to mount the component into the page.
AI-generated descriptionA program that follows the mouse with a circle.