HN user

stereobooster

120 karma
Posts25
Comments20
View on HN
github.com 2y ago

Show HN: Facets – client-side faceted search

stereobooster
4pts1
github.com 6y ago

Show HN: Hiring Process

stereobooster
4pts2
stereobooster.com 6y ago

Function vs. Object

stereobooster
3pts0
stereobooster.com 6y ago

Show HN: Dev.wtf – Developer's Reference

stereobooster
1pts0
stereobooster.com 6y ago

Show HN: Type Systems FAQ

stereobooster
1pts0
stereobooster.com 7y ago

TypeScript: Type vs. Interface

stereobooster
2pts0
stereobooster.com 7y ago

Introduction: From Function to Closure

stereobooster
1pts0
github.com 7y ago

Show HN: The Button

stereobooster
9pts0
github.com 7y ago

Fullscreen mobile modal: how hard can it be?

stereobooster
56pts43
github.com 7y ago

What are types (in type systems)?

stereobooster
1pts0
github.com 7y ago

How to Handle JSON Based APIs in FlowType and TypeScript

stereobooster
2pts0
github.com 7y ago

Opaque types and how they could have saved Mars Climate Orbiter

stereobooster
2pts0
github.com 7y ago

Small practical guide on Flow and TypeScript for JavaScript developers

stereobooster
2pts0
github.com 8y ago

Show HN: An Almost Ideal React Image Component

stereobooster
106pts59
github.com 8y ago

There a lot of type systems in JavaScript world. I listed them all

stereobooster
1pts0
github.com 8y ago

Fields in package.json explained, including unofficial

stereobooster
2pts0
github.com 8y ago

Show HN: CSS-in-JS 101: All you need to know

stereobooster
6pts0
github.com 8y ago

Load performance optimization of create-react-app

stereobooster
1pts0
github.com 8y ago

Ruby Memory Issues and Where to Find Them

stereobooster
4pts0
github.com 8y ago

Show HN: Distributed logging for Ruby web applications

stereobooster
2pts0
github.com 8y ago

Show HN: A zero-configuration static pre-renderer for create-react-app

stereobooster
23pts3
github.com 8y ago

Show HN: Ruby static type checker – proof of concept

stereobooster
115pts24
github.com 8y ago

Show HN: Ruby static type checker – proof of concept

stereobooster
3pts1
github.com 8y ago

Create-react-app recipes

stereobooster
1pts0
github.com 14y ago

JQuery Let it snow Yet another one

stereobooster
1pts0

Module size is ~7Kb. A detailed comparison is here https://github.com/stereobooster/react-ideal-image/blob/mast...

The discussion on performance is too focused on mobile

Because mobile users have a slower internet connection and worse CPUs.

What kind of performance are you talking about? If load performance, then this component uses well-established techniques (not invented by me), like lazy-loading (known since jQuery times), srcset (web standard), LQIP (used by Facebook, Medium), width, height (required for all blocks in AMP).

If you are talking about JS performance like frame rate or paint or "junk" on the scroll - I didn't measure it but didn't say it was the first target either.

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

Ok I see your use case: you load page on good connection, then connection get worse and images are not loaded when you scroll to it.

This component allows to retry image load (click on it).

It can be even more smart, like if network is good go ahead and download everything. Need to think about it

It supports retina/3x. Provide big enough image and it will use it. It takes into account `devicePixelRatio`

maybe default max width of 100% on mobile?

It is.

optional ability to overlay an empty full size block so the image cant easily be right clicked and saved

Not sure what you mean, but as soon as image loaded it turns into good old image, so you can do right click

This rather tends to be a middle ground solution while we do not have an idea how to do types right in Ruby. Let me remind you that whole Ruby core team struggles with this question. But this thing can work with original source code without modification or with type annotations in comments, so it intentionally stays out of Ruby syntax.

it only supports 1.8

Yes, it is because this is a fork of a project started in 2009 (and not maintained afterward). I spent a couple of evenings trying to resurrect it and see what this thing is capable of. There is a lot of things to do to make this really usable. But I was able to get it to the point to run examples (those examples are the same in ruby 2.4).