+ 3

Fetch images from reddit

I have a website and I was trying to make it so every time I press the button the image changes to another image which I fetched from reddit but instead it makes a huge list of images https://codepen.io/twisterzz/pen/xBGWeM

27th Feb 2019, 5:31 PM
TwisterZz
TwisterZz - avatar
5 Respuestas
+ 1
Works really well but the generate button stops working after about 20 clicks
28th Feb 2019, 4:29 PM
TwisterZz
TwisterZz - avatar
0
Didn't change anything :|
27th Feb 2019, 7:47 PM
TwisterZz
TwisterZz - avatar
0
https://codepen.io/bufore/pen/MxwMpm a huge list of images appears because you render each element of the array in fetch. here I made a request for pictures, and then just change the src attribute of the image
27th Feb 2019, 11:14 PM
Before
Before - avatar
0
w ow !!!
20th Dec 2019, 7:57 AM
Cynical Vermin
Cynical Vermin - avatar