Skip to content

Commit

Permalink
Merge pull request #1751 from huixisheng/patch-1
Browse files Browse the repository at this point in the history
docs: update component.md close#1750
  • Loading branch information
Pines-Cheng authored Dec 29, 2018
2 parents 0ffaf9f + dea611b commit 91ebe53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/component.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ render() {

### props

`this.props` 包含了组件该调用者定义的属性。查看 [组件 & Props](.)关于属性的介绍。
`this.props` 包含了组件该调用者定义的属性。查看 [组件 & Props](./props.md)关于属性的介绍。


### state
Expand All @@ -217,6 +217,6 @@ render() {

若你不在 `render()` 方法中使用它,那它就不应该被放在 state 中。例如,你可直接将 timer IDs 放在实例上。

查看 [生命周期 & State](.)了解更多关于状态的信息。
查看 [生命周期 & State](./state.md)了解更多关于状态的信息。

永远不要直接改变 `this.state`,因为调用 `setState()`会替换你之前做的改变。将 `this.state` 当成不可变的。

0 comments on commit 91ebe53

Please sign in to comment.