企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
``` render(){ const status = 'Next play: X' const san = Array.from({length:10},(v,i)=>i) san.map((v,i)=>{ //console.log() return( <div> {this.renderSquare(v)} </div> ) }) return ( <div> <div>{status}</div> <div>{san}</div> </div> ) } ``` ``` class Square extends React.Component{ render(){ return( <button>{/**/}</button> ) } } class Board extends React.Component { renderSquare(i) { return <Square /> } render(){ const status = 'Next play: X' const san = Array.from({length:10},(v,i)=>i) san.map((v,i)=>{ //console.log() return( <div> {this.renderSquare(v)} </div> ) }) return ( <div> <div>{status}</div> <div>{san}</div> </div> ) } } class Game extends React.Component { render(){ return( <div> <div> <Board /> </div> <div> <div>{/* status*/}</div> <ol>{/* TODO */}</ol> </div> </div> ) } } ```