Skip to main content
Public

Share visualization

Loading preview…

This is so cool "Map function inside Map function"

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

This is so cool "Map function inside Map function"

4 stars3Public
NNita
Last edited Sep 15, 2022
Created on Feb 25, 2020

This example produces a dense field of overlapping circles inside an SVG element. It shows how React’s `map` function can be nested to generate a 101x101 grid of points, where each circle’s position, fill color, and stroke are derived from the outer and inner loop indices combined with `Math.random`. The code uses React’s `ReactDOM.render` to place the SVG into the DOM. The resulting composition is a chaotic, colorful scatter of semi-transparent circles with varied strokes, driven purely by the nested mapping logic.

AI-generated description

React Starter code.

Comments

Sign in to join the discussion.

MIT Licensed