Skip to content

Commit

Permalink
remove redundant div
Browse files Browse the repository at this point in the history
  • Loading branch information
yiminghe committed Mar 17, 2016
1 parent 64db70b commit 8eb5bc2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rc-trigger",
"version": "1.2.2",
"version": "1.2.3",
"description": "base abstract trigger component for react",
"keywords": [
"react",
Expand Down
4 changes: 1 addition & 3 deletions src/LazyRenderBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ const LazyRenderBox = React.createClass({
return nextProps.visible;
},
render() {
return (<div>
{this.props.children}
</div>);
return React.Children.only(this.props.children);
},
});

Expand Down

2 comments on commit 8eb5bc2

@afc163
Copy link
Member

@afc163 afc163 commented on 8eb5bc2 Mar 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@afc163
Copy link
Member

@afc163 afc163 commented on 8eb5bc2 Mar 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

直接 return children 可行不?

Please sign in to comment.