Skip to content

Commit 3d672b3

Browse files
Eagleyuqingc
Eagle
authored andcommitted
docs(cn): change translation in content/docs/higher-order-components.md (#338)
* Update translate Just change the translation as original confuses me. * Update higher-order-components.md * Update higher-order-components.md
1 parent 3812e51 commit 3d672b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/higher-order-components.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class BlogPost extends React.Component {
108108

109109
你可以想象,在一个大型应用程序中,这种订阅 `DataSource` 和调用 `setState` 的模式将一次又一次地发生。我们需要一个抽象,允许我们在一个地方定义这个逻辑,并在许多组件之间共享它。这正是高阶组件擅长的地方。
110110

111-
我们可以编写一个创建组件的函数,比如 `CommentList``BlogPost`订阅 `DataSource`。该函数将接受一个子组件作为它的其中一个参数,该子组件将订阅数据作为 prop。让我们调用函数 `withSubscription`
111+
对于订阅了 `DataSource` 的组件,比如 `CommentList``BlogPost`我们可以编写一个创建组件函数。该函数将接受一个子组件作为它的其中一个参数,该子组件将订阅数据作为 prop。让我们调用函数 `withSubscription`
112112

113113
```js
114114
const CommentListWithSubscription = withSubscription(

0 commit comments

Comments
 (0)