eiriklv/react-masonry-component

๐Ÿš‘ Critical bug in componentWillUnmount that breaks the app

a-tokyo opened this issue ยท 3 comments

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 in componentWillUnmount if imagesLoadedCancelRef was truthy.

screen shot 2018-05-29 at 6 58 51 am

PR: #128

Hi, I have the same issue, what did you do to solve it? thanks in advance.

@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