react-swipeable-views
react-swipeable-views copied to clipboard
Endless loading images when swiping
- [x] I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
The image gallery is doing a good job by loading only three images at a time, when not swiping through. However, the images should not load each time from the server even it was loaded before.
Current Behavior
It seems the images being out of the three-images-at-one range are unloaded and loaded again after being in range when swiping. This causes a potential endless loading from the server as long as the user is swiping back and forth
Steps to Reproduce (for bugs)
Just load a few images in your gallery and watch your network tab load the images over and over again.
Context
I am using the React 18 fix version: https://www.npmjs.com/package/react-swipeable-views-react-18-fix
Not sure about the original version tho
Your Environment
| Tech | Version |
|---|---|
| react-swipeable-views react-swipeable-views-react-18-fix | |
| React v18 | |
| platform nodejs |