Mouse tracker
✓ Published0🌍 Public
The mouse tracker shows a single gray-outlined circle following the pointer across an SVG canvas. It demonstrates React’s state management by updating the circle’s center coordinates on every mouse movement via the `onMouseMove` event. The code uses React hooks `useState` and `useCallback`, with `clientX` and `clientY` from the browser event to set the new position. The visualization is purely interactive, with no external data, rendering the circle at a fixed radius of 30 pixels within a 960×500 viewport. The lightweight React setup relies on production builds of React and ReactDOM, and the SVG is generated directly in JSX.
AI-generated descriptionMIT Licensed