Limit the images that are displayed on the page and having fade in transition #103
-
Hey :), I could create a good fine Gallery-Showcase with your nice "react-photo-album". But I encounter a Performance Issue for my usecase, if I display for example 1000 or more images with the "react-photo-album" (using atm a single Arraylist), which having a Filter etc. (also tried to solve it with UseMemo). Thanks in advance and I hope I could describe my problem well! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It's tough to guess what kind of performance issues you face. As to the fade-in effect, there are multiple ways to implement it, and I'm sure you can find all kinds of solutions or even ready-to-use React libraries for that. This question is really outside of the I hope this helps. |
Beta Was this translation helpful? Give feedback.
It's tough to guess what kind of performance issues you face.
react-photo-album
is a highly performant library and can easily render a photo gallery with 1,000 images. In order not to load all images at once, you can implement an "infinite scroll" feature. You can find an example in #90. However, if you are rendering each image as a React component with its own layout effects, I can see this becoming a performance bottleneck at some point (even with infinite scroll). In that case, I'd consider implementing some sort of pagination ("Previous" / "Next" buttons that swap thephotos
array when clicked). It all depends on what kind of user experience you want to build.As to the fade-in effect…