Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

Commit

Permalink
Merge pull request #17 from schwers/support-16
Browse files Browse the repository at this point in the history
Add react 16 compatibility
  • Loading branch information
dazld committed Nov 13, 2017
2 parents b4db00c + 6d5b494 commit bb9cefe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"eslint-plugin-import": "^1.14.0",
"eslint-plugin-jsx-a11y": "^2.2.1",
"eslint-plugin-react": "^6.2.0",
"react-dom": "^15.3.1"
"react": "^15.3.1 || ^16.0.0",
"react-dom": "^15.3.1 || ^16.0.0"
}
}
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ class OnVisible extends Component {
this.props.onChange(this.state.visible);
};
if (isVisible) {
this.setState({
this.setState( () => ({
visible: true,
top
}, end);
}), end);
if (!this.props.bounce) {
this.stopListening();
}
} else if (this.state.visible) {
this.setState({
this.setState(() => ({
visible: false
}, end);
}), end);
}
}
stopListening() {
Expand Down

0 comments on commit bb9cefe

Please sign in to comment.