Fork of Mouse Follower - components
✓ Published0🌍 Public
A React application renders an SVG rectangle that tracks the user's mouse cursor across a 960-by-500 viewport. The `MouseFollower` component uses React's `useState` hook to store cursor coordinates, updating them via an `onMouseMove` event handler that calls `setMousePosition`. The SVG `<rect>` element repositions itself to the stored x and y coordinates. The code demonstrates state-based interaction without external libraries, relying solely on React's change detection to trigger re-renders.
AI-generated descriptionA program that follows your mouse with a circle.
MIT Licensed