Skip to main content
100%

React Mouse

✓ Published0🌍 Public
MMateusGaldinoLG
Last edited Jan 20, 2022
Created on Jan 20, 2022

A React application renders a single black circle that follows the mouse cursor across the full browser window. The circle’s position updates in real time using React’s `useState` and `useCallback` hooks, driven by an `onMouseMove` event on an SVG element. The SVG canvas sizes itself to `window.innerWidth` and `window.innerHeight`, and the circle starts at the screen’s center. The code relies on React 16.9 and ReactDOM to mount the component, with no additional data sources or rendering libraries beyond plain SVG.

AI-generated description

React Mouse

MIT Licensed

Similar vizzes