We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8f2b715 + 6452c29 commit 0574da7Copy full SHA for 0574da7
src/component.js
@@ -26,19 +26,19 @@ export default class SizeMe extends Component {
26
}
27
28
29
- componentWillReceiveProps(nextProps) {
+ componentDidUpdate(prevProps) {
30
const {
31
children: prevChildren,
32
render: prevRender,
33
- ...prevSizeMeConfig
+ ...currentSizeMeConfig
34
} = this.props
35
36
children: nextChildren,
37
render: nextRender,
38
- ...nextSizeMeConfig
39
- } = nextProps
40
- if (!isShallowEqual(prevSizeMeConfig, nextSizeMeConfig)) {
41
- this.createComponent(nextSizeMeConfig)
+ ...prevSizeMeConfig
+ } = prevProps
+ if (!isShallowEqual(currentSizeMeConfig, prevSizeMeConfig)) {
+ this.createComponent(currentSizeMeConfig)
42
43
44
0 commit comments