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.
1 parent 0c0aa62 commit 6452c29Copy full SHA for 6452c29
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