Mouse Follower
✓ Published1🌍 Public
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.
MIT Licensed