How to use IntersectionObserver with Generator function for infinite loading?
I like this generator function. It returns only 20 images at a time cognizant of the offset.
Look at lines 46, 53 above.
So main magic is there.
Then use the IntersectionObserver API. I had to struggle a lot since the Codepen I got was for loading using Pixabay REST API.
It is fun to do programming, as they say.
Here is the HTML.
I love such projects that stretch my programming knowledge whilst solving a real life problem for Photoveda.
I must implement this all over my code now. As you can see, it already uses OO and export/import.