Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
RRyanJHorwitz
Last edited Apr 6, 2022
Created on Apr 6, 2022

A yellow circle follows the mouse cursor across a 960-by-500 SVG canvas. The example demonstrates React’s state management and event handling: the `App` component tracks mouse coordinates via `useState` and updates the circle’s `cx` and `cy` attributes on every `onMouseMove` event. It renders through `ReactDOM.render` into an HTML `#root` element, with the SVG output generated entirely by React elements rather than a separate charting library.

AI-generated description

A Program that follows your mouse with a circle.

MIT Licensed

Similar vizzes