Skip to content

Commit 43b21ef

Browse files
authored
Merge pull request #710 from chaficnajjar/patch-1
Fix grammar mistake in higher-order-components.md
2 parents fff4ba3 + d1d2280 commit 43b21ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/higher-order-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class BlogPost extends React.Component {
106106
- Inside the listener, call `setState` whenever the data source changes.
107107
- On unmount, remove the change listener.
108108

109-
You can imagine that in a large app, this same pattern of subscribing to `DataSource` and calling `setState` will occur over and over again. We want an abstraction that allows us to define this logic in a single place and share them across many components. This is where higher-order components excel.
109+
You can imagine that in a large app, this same pattern of subscribing to `DataSource` and calling `setState` will occur over and over again. We want an abstraction that allows us to define this logic in a single place and share it across many components. This is where higher-order components excel.
110110

111111
We can write a function that creates components, like `CommentList` and `BlogPost`, that subscribe to `DataSource`. The function will accept as one of its arguments a child component that receives the subscribed data as a prop. Let's call the function `withSubscription`:
112112

0 commit comments

Comments
 (0)