News for hackers. Stuff that matters.
Re:Show HN: An Almost Ideal React Image Component by anothergoogler on Saturday June 02, 2018 @02:01AM (#17212985)
As an end user it feels slow. If I hold my space bar on a website created in 1995, I can scan the entire page contents.
Re:Show HN: An Almost Ideal React Image Component by stereobooster on Saturday June 02, 2018 @02:20AM (#17213054)
What you are talking about is more like graceful degradation. If server side rendering is used you will be able to see content ASAP, but not able to scroll, because interaction is blocked by JS. But if you will visit page with JS disabled you will get what you want, because component generates img in noscript tag and you will be able press space to scan the page
Re:Show HN: An Almost Ideal React Image Component by anothergoogler on Saturday June 02, 2018 @02:26AM (#17213066)
Actually pages that use a component like the one in this submission typically show a blurry "beer goggle" version of the image, waiting for JS to replace them with a hi-res version. So with no JS you get a page of beer goggle images (BBC does this for instance).
Re:Show HN: An Almost Ideal React Image Component by stereobooster on Saturday June 02, 2018 @02:57AM (#17213167)
But not this component. This component will load images without JS. Test it yourself https://stereobooster.github.io/react-ideal-image-experiment...
Re:Show HN: An Almost Ideal React Image Component by connorelsea on Saturday June 02, 2018 @02:11AM (#17213025)
You'd still have blank spaces where large images are as they're loading on a slow connection
Re:Show HN: An Almost Ideal React Image Component by anothergoogler on Saturday June 02, 2018 @02:24AM (#17213061)
I'm talking about lazy loading that waits until the image enters the viewport. An HTML page created in 1995 loads the images eagerly.