🌍 Public
Viewing a saved revision (read-only)
b88ded19ac564a9d8914cc124a41f071
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.