Skip to main content
100%

Fork of Smiley Face Part II

✓ Published0🌍 Public
SSan
Last edited Apr 15, 2023
Created on Apr 15, 2023

A smiling face made of yellow circles fills the browser window, but its eyes follow the pointer in real time. The React app tracks mouse coordinates via the `onMouseMove` event, updating the eye positions through `useState` and `useCallback`. The SVG is rendered with ReactDOM, using hardcoded dimensions from `window.innerWidth` and `window.innerHeight`. The face’s static features—head, stroke, and mouth—are defined as SVG circles, while the dynamic eyes are the only responsive elements.

AI-generated description

Smiley face implementation with React.

MIT Licensed

Similar vizzes