Skip to content

Instantly share code, notes, and snippets.

View batbrain9392's full-sized avatar

Debmallya Bhattacharya batbrain9392

View GitHub Profile
@batbrain9392
batbrain9392 / board.jsx
Last active March 11, 2020 23:31 — forked from danielgnz/tic-tac-toe-1.jsx
React tic-tac-toe tutorial - Rewrite Board to use two loops to make the squares instead of hardcoding them
render() {
return (
<div>
<div className="board-row">
{
Array(3).fill(null).map((_, i) => {
const row = Array(3).fill(null).map((_, j) => this.renderSquare(3 * i + j));
return (
<div key={i} className="board-row">
{row}