I have a little issue with React. I can\'t create a nested component with a for loop. What I want to do is create 9 cells of a table and then create 3 rows with 3 cells for
This snippet uses map in a way similar to how we define a nested loop.
const buildBoard = [0,1,2].map((row)=>{ return ( { [0,1,2].map((col)=>{ return ( this.renderSquare(row*3+col) ) }) } ) }); return ( {buildBoard} );