Skip to content

Commit

Permalink
docs(cn): translate new sentence in tutorial (#656)
Browse files Browse the repository at this point in the history
Co-authored-by: QiChang Li <github@liqichang.com>
  • Loading branch information
SomiaWhiteRing and QC-L committed Nov 21, 2021
1 parent 1fcf159 commit b5d3266
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/tutorial/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,7 @@ class Game extends React.Component {
}
```

Notice in `jumpTo` method, we haven't updated `history` property of the state. That is because state updates are merged or in more simple words React will update only the properties mentioned in `setState` method leaving the remaining state as that is. For more info **[see the documentation](/docs/state-and-lifecycle.html#state-updates-are-merged)**.
`jumpTo` 方法中, 我们没有更新 state 中的 `history` 属性。这是因为 state 更新被合并了,或者用更简单的话说,React 不会更新 `setState` 方法中未提到的属性。 **[这篇文档](/docs/state-and-lifecycle.html#state-updates-are-merged)**对此有更详细的介绍。

接下来,我们还要修改 Game 组件的 `handleClick` 方法,当你点击方格的时候触发该方法。

Expand Down

0 comments on commit b5d3266

Please sign in to comment.