🌍 Public
Viewing a saved revision (read-only)
3c0bfcad48f44fb8829c77ee1873d2cc
3. Mouse follower
A circle follows the mouse cursor across an SVG canvas. The visualization demonstrates interactive state management in React, where mouse movement events update the circle's position. The code uses React's `useState` and `useCallback` hooks to track cursor coordinates, and renders the result as an SVG circle element. The page loads React 17, ReactDOM, and D3 v7 from a CDN, with the application contained in a single `index.js` file. The circle starts at the center of the 960x500 viewport and moves responsively to user input.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.