File tree 2 files changed +15
-0
lines changed
packages/react-container-query/src
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
8
8
## [ Unreleased]
9
9
10
+ ## [ 2.4.2]
11
+
12
+ ### Fixed
13
+
14
+ * ` react-container-query `
15
+ * ` ContainerQuery ` no longer tries to set state for an unmounting component
16
+
10
17
## [ 2.4.1]
11
18
12
19
### Fixed
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ export default class ContainerQuery extends Component {
18
18
}
19
19
20
20
handleResize ( size ) {
21
+ if ( this . unMounting ) {
22
+ return ;
23
+ }
24
+
21
25
this . setState ( { size } ) ;
22
26
}
23
27
@@ -46,6 +50,10 @@ export default class ContainerQuery extends Component {
46
50
}
47
51
}
48
52
53
+ componentWillUnmount ( ) {
54
+ this . unMounting = true ;
55
+ }
56
+
49
57
render ( ) {
50
58
return this . props . render ( this . state . size ) ;
51
59
}
You can’t perform that action at this time.
0 commit comments