Skip to content

Commit

Permalink
docs: update docs/React/state_props.md
Browse files Browse the repository at this point in the history
  • Loading branch information
qiufeihong2018 committed May 8, 2024
1 parent 9f0908f commit efc7aad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/React/state_props.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const element = <Welcome name="Sara" onNameChanged={this.handleName} />;

上述 `name` 属性与 `onNameChanged` 方法都能在子组件的 `props` 变量中访问

在子组件中,`props` 在内部不可变的,如果想要改变它看,只能通过外部组件传入新的 `props` 来重新渲染子组件,否则子组件的 `props` 和展示形式不会改变
在子组件中,`props` 在内部不可变的,如果想要改变它,只能通过外部组件传入新的 `props` 来重新渲染子组件,否则子组件的 `props` 和展示形式不会改变

## 三、区别

Expand Down

0 comments on commit efc7aad

Please sign in to comment.