9 ms·
One of the best use cases is lazy loading expensive data until the div is visible. Image loading, or even fetching a resource. You essentially get this for free
by andrewbarba 10y ago
One of the best use cases is lazy loading expensive data until the div is visible. Image loading, or even fetching a resource. You essentially get this for free in native apps (iOS/Android with recycled views) but there hasn't been a great way to accomplish this on the web.
Note: this is definitely not the same as a recycled view. But can help accomplish one aspect
- talklittle 10y agoYes, lazy loading is a good use case. Echo.js (https://github.com/toddmotto/echo https://github.com/toddmotto/echo) is another small no-dependency library (1.89 KB minified), which detects elements appearing on screen, and goes a step further to swap the "src" attribute with a placeholder for lazy loading and unloading. Disclosure: I've submitted a pull request to it.