Skip to main content
100%

3. Mouse follower

✓ Published1🌍 Public
DDenis Zjukow
Last edited Sep 14, 2021
Created on Sep 14, 2021
Forked from 1. Faces

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 description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes