Fork of React Starter
✓ Published0🌍 Public
This example demonstrates a React component that renders a single circle that follows the mouse cursor across an SVG canvas. Using React’s `useState` hook, the component tracks the cursor’s `clientX` and `clientY` coordinates through an `onMouseMove` event handler, updating the circle’s `cx` and `cy` attributes in real time. The visualization is built with React 16 and ReactDOM, rendering directly into a 960×500 SVG viewport. It shows how declarative state management and SVG’s vector graphics can create a simple interactive pointer-tracking effect without any external data or charting libraries.
AI-generated descriptionReact Starter code.
MIT Licensed