Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Follower 2

Public visualization

Viewing a saved revision (read-only)

e6e8828cfcf6402297707b16a3523f2e

Follower 2

0 stars1🌍 Public
Jjth500
Last edited Apr 22, 2023
Created on Apr 22, 2023

This example shows a React application that renders a single SVG circle that follows the user's mouse cursor across the full browser viewport. The circle updates its position in real time using React's `useState` hook and an `onMouseMove` event handler that reads the cursor's client coordinates. The rendering relies on `ReactDOM.render` to mount the component to the HTML root element, while D3 v5 is loaded but not utilized in the visible interaction. The SVG viewport dimensions are set dynamically from `window.innerWidth` and `window.innerHeight`.

AI-generated description

Smiley face implementation with React.