Skip to main content
100%

Mouse Follower

✓ Published1🌍 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.

MIT Licensed

Similar vizzes