Skip to content

Limit the images that are displayed on the page and having fade in transition #103

Discussion options

You must be logged in to vote

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 the photos array when clicked). It all depends on what kind of user experience you want to build.

As to the fade-in effect…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by igordanchenko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants