Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

On mouse click - object mapping

Public visualization

On mouse click - object mapping

0 stars1🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed