Check out example codes for "how to add lazy loading in html". It will help you in understanding the concepts better.

Code Example 1

lazy loading in html

<img src="myimage.jpg" loading="lazy" alt="..." />
<iframe src="content.html" loading="lazy"></iframe>

Learn ReactJs, React Native from akashmittal.com