Fork of Mouse Follower 2 - JAT
✓ Published1🌍 Public
This example shows a circle in an SVG that tracks the user’s mouse movements across a 960×500 canvas, starting from the center. Built with React hooks, it uses `useState` to store the cursor’s `clientX` and `clientY` coordinates and `useCallback` to update that state on every `onMouseMove` event. ReactDOM renders the SVG element and its circle, whose `cx` and `cy` attributes are bound to the tracked position. The circle’s constant radius is 30 pixels.
AI-generated descriptionA program that follows your mouse with a circle.
MIT Licensed