企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
``` class Board extends React.Component { Square(i){ return <Square value="i"/> } render(){ const status = "Next player: X"; return ( <div> <div className="status">{status}</div> <div className="board-row"> {this.Square(0)} {this.Square(1)} {this.Square(2)} </div> <div className="board-row"> {this.Square(3)} {this.Square(4)} {this.Square(5)} </div> <div className="board-row"> {this.Square(6)} {this.Square(7)} {this.Square(8)} </div> </div> ) } } ``` ``` class Board extends React.Component { Square(i){ return <Square value="{i}"/> } render(){ const status = "Next player: X"; return ( <div> <div className="status">{status}</div> <div className="board-row"> {this.Square(0)} {this.Square(1)} {this.Square(2)} </div> <div className="board-row"> {this.Square(3)} {this.Square(4)} {this.Square(5)} </div> <div className="board-row"> {this.Square(6)} {this.Square(7)} {this.Square(8)} </div> </div> ) } } ``` ``` Square(i){ return <Square value={i}/> } ```