Live example: https://codesandbox.io/s/learning-int...
Additional Notes:
the observer instance you created can be assigned multiple refs
eg.
this.observer.observe(this.loadRef1);
this.observer.observe(this.loadRef2);
entry.intersectionRatio always contains the % to which your selected ref is visible on screen.
Here more on mdn documentation page. https://developer.mozilla.org/en-US/d...
On this page of the site you can watch the video online infinite scrolling using Intersection Observer API - ReactJS (Live Example) with a duration of hours minute second in good quality, which was uploaded by the user Rahul Makhija 03 October 2019, share the link with friends and acquaintances, this video has already been watched 820 times on youtube and it was liked by 5 viewers. Enjoy your viewing!