Skip to main content
100%

This is so cool "Map function inside Map function"

✓ Published3🌍 Public
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.

MIT Licensed

Similar vizzes