Email or username:

Password:

Forgot your password?
Baldur Bjarnason

Liskovโ€™s Gun: The parallel evolution of React and Web Components

baldurbjarnason.com/2024/lisko

This is a bit of an experiment. Probably the longest essay I've published directly on my website. ๐Ÿ™‚

14 comments
Baldur Bjarnason

Couldn't come up with a nice linkbait-y title for this one, so ended up with a relatively sensible one that probably downplays the number of hot takes and swearing in it ๐Ÿ˜†

bkardell

@baldur Curious how long it took to write this one?

Baldur Bjarnason

@bkardell I jotted down the first few notes that ultimately led to the essay on the 3rd of October. So, six days? Probably should have baked it for longer ๐Ÿ˜…

Hidde

@baldur @bkardell wow! I admire your writing / thinking skills

Baldur Bjarnason

@hdv @bkardell Lotโ€™s of practice! And being open to looking really stupid for writing half-baked stupid things ๐Ÿ˜…

Stewart Sims

@baldur can't claim to have read it all in detail (will bookmark), but I agree with a lot of what's being said and like your take in considering the nuance of all this.

There seems common threads in people's takes on this. Another prescient concern is the UX trade offs of [the lack of] progressive enhancement.

Would be interested to know if you've looked at 'Marko' and have a take on it as something of a React alternative:
markojs.com/

Baldur Bjarnason

@stew_sims Only had a quick glance at it a while back. Looked interesting but didnโ€™t quite fit my needs at the time. ๐Ÿ™‚๐Ÿ‘๐Ÿป

cthos ๐Ÿฑ

@baldur I've already laughed audibly a few times during this and I'm only about 40% of the way through it.

Nolan Lawson

@baldur Fantastic post. My only minor quibble is that I do think the React team has kept innovating โ€“ concurrent rendering and RSCs come to mind. Although I'm not convinced the first is a great idea (nolanlawson.com/2022/10/22/sty) and the second seems to be heavily dividing the React community, I have to give them credit for having the guts to try new stuff even though they're the clear market leader.

Nolan Lawson

@baldur BTW I never understood the whole Liskov substitution thing until this post. It's not just a problem for built-ins, but also web component libraries that allow subclassing. Any change to the superclass is effectively a breaking change unless the subclass automatically gets the new behavior somehow (e.g. super.connectedCallback).

Alex Russell

@nolan @baldur This was always true! We wanted to add traits or some other factoring mechanism to allow for decomposition, but TC39 could barely do intrinsic subclassing w/ `class` syntax in a ~timely way.

Alex Russell

@nolan @baldur DOM is crying out for decomposition to mixins/traits, and we hoped to do it. But browser vendors whatabouting without actually investigating developer problems (and failing to implement what they stopped the presses to relitigate) dragged everything out.

ThomasAPowell

@baldur +1 on the laughs sprinkled into a piece with great webdev insights and excellent cross-pollination of CS and SE thoughts throughout. The experiment was successful from my PoV.

Go Up