Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlplusb committed Apr 27, 2019
2 parents 8f2b715 + 6452c29 commit 0574da7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ export default class SizeMe extends Component {
}
}

componentWillReceiveProps(nextProps) {
componentDidUpdate(prevProps) {
const {
children: prevChildren,
render: prevRender,
...prevSizeMeConfig
...currentSizeMeConfig
} = this.props
const {
children: nextChildren,
render: nextRender,
...nextSizeMeConfig
} = nextProps
if (!isShallowEqual(prevSizeMeConfig, nextSizeMeConfig)) {
this.createComponent(nextSizeMeConfig)
...prevSizeMeConfig
} = prevProps
if (!isShallowEqual(currentSizeMeConfig, prevSizeMeConfig)) {
this.createComponent(currentSizeMeConfig)
}
}

Expand Down

0 comments on commit 0574da7

Please sign in to comment.