Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars1🌍 Public
TTakuya Kitazawa
Last edited Jan 12, 2021
Created on Jan 12, 2021

A full-window SVG circles a crosshair that tracks the mouse cursor. A React component uses the `useState` and `useCallback` hooks to store and update the pointer's `clientX` and `clientY` coordinates on every `onMouseMove` event. The circle’s center position is bound directly to these state values, and React re-renders the SVG element instantaneously as the user moves the mouse.

AI-generated description

Mouse follower.

Comments

Sign in to join the discussion.

MIT Licensed