ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
Each child in a list should have a unique "key" prop. ``` render(){ const hispldy = this.state.hispldy; const current = hispldy[hispldy.length-1]; const moves = hispldy.map((setp,move)=>{ const desc = move ? 'Go to move' + move : 'Go to game start'; return ( <li> <button onClick={()=>this.jumpTo(move)}>{desc}</button> </li> ) }) ``` ``` jumpTo(move){ console.log(move); const hispldy=this.state.hispldy[move] console.log(hispldy) this.setState({ spulist:hispldy['spulist'] }) } render(){ const hispldy = this.state.hispldy; const current = hispldy[hispldy.length-1]; const moves = hispldy.map((setp,move)=>{ const desc = move ? 'Go to move' + move : 'Go to game start'; return ( <li key={move}> <button onClick={()=>this.jumpTo(move)}>{desc}</button> </li> ) }) ```