Skip to content

Commit

Permalink
Merge pull request #12 from bitmatica/master
Browse files Browse the repository at this point in the history
Make sure the component updates if the state changes.
  • Loading branch information
maslianok authored May 4, 2017
2 parents 11c529a + 337b279 commit b31f737
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/ResizeDetector.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export default class ResizeDetector extends Component {
this.reset(width, height);
}

shouldComponentUpdate(nextProps) {
return this.props !== nextProps;
shouldComponentUpdate(nextProps, nextState) {
return this.props !== nextProps || this.state !== nextState;
}

componentDidUpdate() {
Expand Down

0 comments on commit b31f737

Please sign in to comment.