Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Mouse Follower

Public visualization

Viewing a saved revision (read-only)

77ee8bd4a9b743b597735410e571ba65

Fork of Mouse Follower

0 stars0🌍 Public
Ppete0707
Last edited Nov 14, 2022
Created on Nov 14, 2022
Forked from Mouse Follower

A React-based SVG visualization demonstrates mouse tracking by rendering a filled circle that follows the cursor across a 960 by 500 viewport. The app uses React’s `useState` and `useCallback` hooks to store and update the mouse position on every `mousemove` event, setting the circle’s `cx` and `cy` attributes accordingly. The circle starts at the canvas center and moves immediately as the pointer travels, with no delay or animation. The implementation relies on React 16.9 and ReactDOM to render the SVG element directly into the DOM.

AI-generated description

A program that follows your mouse with a circle.