Skip to content

Commit ec87f43

Browse files
haritonastyrenatorib
authored andcommitted
added throttle cancel method (#39)
1 parent f9404d2 commit ec87f43

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/withSizes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ const withSizes = (...mappedSizesToProps) => WrappedComponent => {
6969
}
7070

7171
componentWillUnmount() {
72+
this.throttledDispatchSizes.cancel()
7273
window.removeEventListener('resize', this.throttledDispatchSizes)
7374
}
7475

0 commit comments

Comments
 (0)