Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Getting to know React(making a mouse follower)

Public visualization

Getting to know React(making a mouse follower)

0 stars0🌍 Public
MManish Singh
Last edited Jul 14, 2022
Created on Jul 14, 2022

A React application renders a single SVG circle that follows the mouse cursor across a 960 by 500 canvas. The circle's center coordinates update on every mouse movement via the `onMouseMove` event handler, which calls `setMousePosition` to update the component's state. The code uses React's `useState` hook and `ReactDOM.render` to manage the interactive behavior, drawing the circle as an SVG `<circle>` element with a fixed radius of 50 pixels.

AI-generated description

using React

Making a mouse follower. :)

Comments

Sign in to join the discussion.

MIT Licensed