Skip to main content
100%

Fork of React Starter

✓ Published0🌍 Public
Rraptor-lucifer
Last edited Jul 17, 2021
Created on Jul 17, 2021
Forked from React Starter

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 description

React Starter code.

MIT Licensed

Similar vizzes