🌍 Public
Viewing a saved revision (read-only)
a18ec1a22c65476f9558f1e432179e49
Mouse Follower color changer
A React application renders an SVG circle that follows the mouse cursor across a full-screen viewport, changing its fill color randomly on every mouse movement. The circle starts at the center of the 960×500 SVG canvas and uses React’s `useState` and `useCallback` hooks to track the cursor’s client coordinates via the SVG `onMouseMove` event. Each move updates the circle’s position and generates new random RGB values for its fill using the `rgb()` color function. The visualization demonstrates real-time event handling and state-driven rendering with React and SVG.
AI-generated descriptiona program that followed your mouse with a circle.