Skip to main content
100%

Mouse Follower

✓ Published0🌍 Public
YYann Bilodeau
Last edited Feb 11, 2022
Created on Feb 11, 2022
Forked from FCC-Course-Smiley

A circle follows the mouse cursor inside an SVG canvas, updating its position in real time as the user moves over the 960×500 drawing area. The example demonstrates React state management with `useState` and event handling via the `onMouseMove` callback, rendering the circle as an SVG `<circle>` element. It uses React 16.9 and ReactDOM to mount the component, with the circle’s coordinates derived directly from the browser’s `clientX` and `clientY` event properties.

AI-generated description

A program that follows the mouse with a circle.

MIT Licensed

Similar vizzes