As the title states, I’ve been struggling to wrap my head around how to create a gallery block type component, which renders X, let’s say 20 (out of Y, let’s say 30) images at a time. After an amount of time, one image from the grid fades out and is replaced with a new image from the remainder of undisplayed images, and this repeats indefinitely. I’ve looked at using Math.Random to pick two values in an array to swap, I’ve looked into swapping the img src in the arrays, but I feel like there is a much more react-y way that I’m just missing. Anyone know of how to do this, or seen something that uses a similar technique?
submitted by /u/coloradoninja
[link] [comments]