Skip to main content
100%

Interaction with React

✓ Published0🌍 Public
EErika Nagai
Last edited Jan 20, 2023
Created on Jan 20, 2023

A React application renders a single SVG circle at the center of a 960×500 canvas. The circle follows the mouse by logging the cursor's clientX and clientY coordinates to the console on every mousemove event. Using React 16.9 and ReactDOM, the example demonstrates event handling within an SVG element, where the `onMouseMove` prop triggers a `handleMouseMove` function. The circle itself remains static at its initial position, showing how React manages state and events in a minimal interactive visualization.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes