Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

4ec936a95d754005aaf293833122ea0e

Mouse Follower

0 stars1🌍 Public
JJames Huang
Last edited Sep 19, 2023
Created on Sep 19, 2023

This is a React application that renders a single smiley face as an SVG circle, which follows the mouse cursor across the screen. The component tracks pointer movement through React's `useState` and `useCallback` hooks, updating the circle's center coordinates with each mouse event. The SVG is rendered with React, while the page loads React and D3 v5 from CDN links in the HTML. The interactive behavior is driven entirely by React's event handling, not by D3's own mouse utilities.

AI-generated description

Smiley face implementation with React & D3.