Skip to content

Commit

Permalink
Merge pull request #53 from abdullahtariq1171/remove-constructor
Browse files Browse the repository at this point in the history
No need for constructor
  • Loading branch information
yjose authored Oct 31, 2018
2 parents ba910b8 + 3eaf62b commit fa675cd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,11 @@ if (process.env.NODE_ENV !== "production") {
}

class Ref extends React.PureComponent {
constructor(props) {
super(props);
}
componentDidMount() {
const { innerRef } = this.props;
if (innerRef) innerRef(findDOMNode(this));
}

render() {
const { children } = this.props;
return React.Children.only(children);
Expand Down

0 comments on commit fa675cd

Please sign in to comment.