Browse Source

Minor edit

main
Dan 7 years ago
parent
commit
438117a426
  1. 2
      content/tutorial/tutorial.md

2
content/tutorial/tutorial.md

@ -830,7 +830,7 @@ class Game extends React.Component {
}
```
Next, we'll have the Board component receive `squares` and `onClick` props from the Game component by props. Since we now have a single click handler in Board for many Squares, we'll need to pass the location of each Square into the `onClick` handler to indicate which Square was clicked. Here are the required steps to transform the Board component:
Next, we'll have the Board component receive `squares` and `onClick` props from the Game component. Since we now have a single click handler in Board for many Squares, we'll need to pass the location of each Square into the `onClick` handler to indicate which Square was clicked. Here are the required steps to transform the Board component:
* Delete the `constructor` in Board.
* Replace `this.state.squares[i]` with `this.props.squares[i]` in Board's `renderSquare`.

Loading…
Cancel
Save