Skip to main content
100%

Fork of Fork of HTML Starter

✓ Published0🌍 Public
VVictor Abrokwah
Last edited Oct 27, 2021
Created on Oct 23, 2021

This example demonstrates a single circle rendered within an SVG container that tracks the mouse position, though the circle itself remains fixed at its initial coordinates. Built with React and D3 v7, the application uses React’s `useState` to store the mouse position and `useCallback` to capture mouse movement events on the SVG element. The code imports React and ReactDOM to manage the component lifecycle, while the SVG’s `onMouseMove` handler logs the cursor’s client coordinates to the console. The visualization highlights basic React state management and event handling within a D3-powered SVG canvas.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes