Theoretical Question

What is Lazy Loading in javascript and react

I know about it from the reference of <img> tag.
Lazy Loading- Load the image when certain conditions are met. Like sometimes our website has a lot of pages like wiki, so we don’t want each image to get loaded just after the user visits the page. This is done to improve our website loading performance.

Eager loading- This is by default loading. Opposite to lazy, gets loaded immediately when the user opens a page.

1 Like