react-awesome-lightbox | move feature with touch support 💡📦 | Frontend Framework library
kandi X-RAY | react-awesome-lightbox Summary
kandi X-RAY | react-awesome-lightbox Summary
Lightbox for react with zoom, rotate and move feature with touch support
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of react-awesome-lightbox
react-awesome-lightbox Key Features
react-awesome-lightbox Examples and Code Snippets
Community Discussions
Trending Discussions on react-awesome-lightbox
QUESTION
I have a react app where I am using 'react-image-pan-zoom-rotate' for showing images.
https://github.com/mgorabbani/react-image-pan-zoom-rotate
I basically have a url of external service that provides the image which I am passing to both of the below libraries to render the image.
Recently I have started facing a issue(only in Chrome) where if the cache is disabled, then whenever i click on the image in browser or use any controls provided by this component it rerenders it which results in another call to the external image server. And this happens whenever i click/interact with the image or the view generated by the above react library.
Now I have started using https://github.com/theanam/react-awesome-lightbox/blob/master/src/index.js and it does not have any such issues with cache disabled.
Any idea why this could be happening ?
...ANSWER
Answered 2021-Mar-20 at 09:41I can reproduce the behavior you describe: https://codesandbox.io/s/n1rv671pkj disabling cache does cause the image to re-downloaded every time.
The problemThis is due to their implementation (that can be seen here https://github.com/mgorabbani/react-image-pan-zoom-rotate/blob/master/src/PanViewer.tsx) where they set key={dx}
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-awesome-lightbox
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page