๐ Critical bug in componentWillUnmount that breaks the app
a-tokyo opened this issue ยท 3 comments
a-tokyo commented
Description
When disableImagesLoaded
is true, componentWillUnmount
throws this.imagesLoadedCancelRef is not a function
How to reproduce
- Pass
disableImagesLoaded
prop, render then unmount the component.
Fix
- Only call
derefImagesLoaded
incomponentWillUnmount
ifimagesLoadedCancelRef
was truthy.
PR: #128
roruva commented
Hi, I have the same issue, what did you do to solve it? thanks in advance.
a-tokyo commented
@roruva I had to not use disableImagesLoaded
for now :/
I opened a PR that fixes it, hopefully it gets merged soon ๐
Edit: you can also use this at the meantime https://github.com/A-Tokyo/react-masonry-component
afram commented
6.2.1 should be published. Apologies for the delay and thanks for the contribution