From 85b5d3796167d9e6ded455394686e9ef3df85268 Mon Sep 17 00:00:00 2001 From: Iurii Kucherov Date: Fri, 13 Jan 2017 22:17:48 +0100 Subject: [PATCH] Update higher-order-components.md (#8780) --- docs/higher-order-components.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/higher-order-components.md b/docs/higher-order-components.md index 05e0762f..0ccac35d 100644 --- a/docs/higher-order-components.md +++ b/docs/higher-order-components.md @@ -64,7 +64,8 @@ class CommentList extends React.Component { ))} ); - }} + } +} ``` Later, you write a component for subscribing to a single blog post, which follows a similar pattern: @@ -95,7 +96,8 @@ class BlogPost extends React.Component { render() { return ; - }} + } +} ``` `CommentList` and `BlogPost` aren't identical — they call different methods on `DataSource`, and they render different output. But much of their implementation is the same: @@ -157,7 +159,7 @@ function withSubscription(WrappedComponent, selectData) { // Notice that we pass through any additional props return ; } - }); + }; } ```