Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
Wwzhang88
Last edited Nov 20, 2021
Created on Nov 17, 2021

A smiley face follows the mouse cursor on an SVG canvas, with a yellow circle acting as the face and a smaller circle representing its mouth. Built with React and ReactDOM, the component tracks the cursor’s position via the `onMouseMove` event and updates state with the `useState` and `useCallback` hooks, re-rendering the SVG circle’s `cx` and `cy` coordinates accordingly.

AI-generated description

Smiley face implementation with React.

MIT Licensed

Similar vizzes