Skip to main content
100%

Mouse Follower

✓ Published0🌍 Public
SSong Tao Chen
Last edited Dec 27, 2021
Created on Dec 26, 2021

A React component renders an SVG circle that follows the mouse pointer across a 960 by 500 viewport. The circle’s center coordinates are updated via React’s `useState` hook and a `handleMouseMove` callback attached to the SVG’s `onMouseMove` event. The `useCallback` hook memoizes the event handler, and `ReactDOM.render` mounts the app. The visualization demonstrates basic state-driven interactivity without external data, using only React and SVG primitives.

AI-generated description
MIT Licensed

Similar vizzes