Skip to main content
100%

React Starter

✓ Published1🌍 Public
NNita
Last edited Jul 18, 2020
Created on Jul 18, 2020
Forked from React Starter

A React starter example demonstrates interactive mouse tracking on an SVG canvas. The code uses React's `useState` and `useCallback` hooks to manage and update mouse position state, rendering a single circle that follows the cursor within a 960×500 viewport. The circle’s center coordinates update reactively on every `mousemove` event, triggered through an SVG `onMouseMove` handler. Built with React 16.13.1 and ReactDOM, it renders directly to the DOM using the `ReactDOM.render` API, with the SVG output specified via JSX.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes