Skip to main content
100%

Mouse follower

✓ Published2🌍 Public
AAnimesh Nautiyal
Last edited Oct 13, 2020
Created on Oct 13, 2020
Forked from HTML Starter

A React application renders a full-screen SVG that tracks the mouse cursor with a black circle. The component uses React hooks `useState` and `useCallback` to store and update the cursor position on every `mousemove` event, and re-renders the SVG circle’s `cx` and `cy` attributes accordingly. The SVG’s width and height are set to the browser window dimensions, and the circle’s radius is fixed at 30 pixels. ReactDOM is used to mount the component into the DOM, with no external data source beyond the user’s pointer movement.

AI-generated description

Mouse follower

MIT Licensed

Similar vizzes