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