2017-05-23 1 views
0

작동하지 https://codepen.io/gaearon/pen/gWWQPY?editors=0010

  • renderSquare(i) { 
        return <Square value={ this.state.squares[i] } />; 
        } 
    
  • 답변

    1

    작동하지 않는 코드에서 철자를 입력했습니다 (onclick). . 이것은 올바르지 않습니다. 이는 onClick입니다.

    <button className="square" onClick = {() => this.setState({value: 'X'})}> 
    

    지금은 그 변화와 함께, 작업을 보여줍니다 포크 : http://codepen.io/anon/pen/eWxdoG?editors=0010

    관련 문제