Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
LLem Dulfo
Last edited Mar 8, 2021
Created on Mar 8, 2021

A full-screen SVG circle tracks the mouse in real time. It demonstrates React state management and event handling by updating the circle’s coordinates on every pointer movement. The application uses React’s `useState` and `useCallback` hooks within a functional component, rendering a single `<circle>` element inside an `<svg>` that covers the viewport. The `onMouseMove` event triggers a state update with the cursor’s `clientX` and `clientY` positions, causing React to re-render the circle at the new location.

AI-generated description

A program that follows your mouse.

MIT Licensed

Similar vizzes