Skip to main content
100%

On mouse click - object mapping

✓ Published1🌍 Public
NNita
Last edited May 29, 2020
Created on May 29, 2020

A React and SVG visualization displays a green circle that jumps to the location of a mouse click on a 960 by 500 canvas. The app uses React's `useState` and `useCallback` hooks to track the latest click coordinates, updating a circle element rendered via ReactDOM. The data is simply the current mouse position, stored in an array and mapped to an SVG circle's center coordinates.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes