Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Interaction with React

Public visualization

Interaction with React

0 stars0🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed