frontend-collective / react-image-lightbox

React lightbox component
https://frontend-collective.github.io/react-image-lightbox/
MIT License
1.29k stars 357 forks source link

Image not loading on launch when React.StrictMode is enabled. #672

Closed dmrkosterit closed 1 year ago

dmrkosterit commented 2 years ago

When the app is wrapped around in StrictMode like root.render(

< App /> ); The lightbox gets stuck on the spinner until the image changes or the zoom-in button clicks.
quangtho2910 commented 2 years ago

I got the same problem too!

MrScX commented 2 years ago

Same here. Any updates on this?

jelizarovas commented 2 years ago

Same here. Was wrapping my head around why it wouldn't load.

Lightbox itself loads, presing next or forward loads the images, zooming in also shows the images. Just initially stuck on loop.

theutkarshsoni commented 2 years ago

Same problem. Any updates?

I used the below temp hack and it worked for me.

https://github.com/frontend-collective/react-image-lightbox/issues/589#issuecomment-1159723673

Thanks @ihappycoder

BozidarSiljanoski commented 2 years ago

This is connected to https://github.com/reactjs/react-modal/issues/808 this issue on react-modal

mleister97 commented 1 year ago

Seems like the lib is no longer maintained. Really sad...