Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Smiley Face Part II

Public visualization

Fork of Smiley Face Part II

0 stars0🌍 Public
Ttnk-dev
Last edited Jun 21, 2021
Created on Jun 21, 2021

A single gray circle follows the user's mouse across a full-screen SVG canvas, updating its position in real time as the pointer moves. Built with React and ReactDOM, the application uses the `useState` and `useCallback` hooks to track the mouse's client coordinates via an SVG `onMouseMove` event handler. The circle's `cx` and `cy` attributes are bound to the tracked state, while the viewport dimensions are read directly from `window.innerWidth` and `window.innerHeight`.

AI-generated description

Smiley face implementation with React.

Comments

Sign in to join the discussion.

MIT Licensed