Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Fork of HTML Starter

Public visualization

Fork of Fork of HTML Starter

0 stars0🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed