You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was going through the source tonight and noticed useLazyLoad. It's not documented or in the playground. Is that simply accidental? Is it functional and usable?
Thanks!
The text was updated successfully, but these errors were encountered:
Yes it is functional while very basic compared to alternative such as (https://github.com/verlok/vanilla-lazyload). It is a derivative of useIntersection using the IntersectionObserver API.
I built it at the very start of this library mostly for testing the Observers. I never officially released it as I am not convinced this is still a relevant feature to have when most modern browser (except Safari) have the built-in feature `loading="lazy".
If you want to test it here is a basic html that should work
Since the Safari devs are being so slow with this, I'd argue that this is a relevant feature, and I'd love to use this as a composable behaviour. Also, Firefox devs seem to have no rush implementing loading=lazy for iframes, which is almost more important than for images if your site embeds YouTube videos. (I think it's borderline hilarious that Google (through Lighthouse) punishes devs for using Google products (i.e. YouTube, which is so full of bad scripts and placeholder images Lighthouse docks you several points if you don't lazyload the iframe).)
marcoroth
changed the title
useLazyLoad: Undocumented behavioruseLazyLoad: Undocumented behavior
Aug 6, 2022
Hi again!
I was going through the source tonight and noticed
useLazyLoad
. It's not documented or in the playground. Is that simply accidental? Is it functional and usable?Thanks!
The text was updated successfully, but these errors were encountered: