🌍 Public
Viewing a saved revision (read-only)
9aac6ac9a91e4a17b8cca9b91a812cf6
Mouse Follower
A single circle follows the mouse cursor within an SVG canvas. The example demonstrates the basic concept of tracking pointer movement and updating a visual element's position in response. It is built with React hooks, specifically `useState` to manage the circle's coordinates and `useCallback` to handle the `onMouseMove` event, rendering the circle with SVG attributes `cx` and `cy`. The scene is initialized with the circle centered, and no external data source is used.
AI-generated descriptionSeguir o mouse com um circulo.