import React from "react"; import defaultState from "store/default_state"; import ChessBoardSquare from "components/chess-board-square"; class ChessBoard extends React.Component { constructor(props) { super(props); this.state = defaultState; } chessBoardRow(row, i) { return (
{row.map( (square, j) => )}
) } render() { return (
{this.state.board.map((row, i) => this.chessBoardRow(row, i))}
); } } export default ChessBoard;