Read the Tea Leaves

https://nolanlawson.com

Software and other dark arts, by Nolan Lawson

フィード

記事のアイキャッチ画像
Bugs I’ve filed on browsers
Read the Tea Leaves
I think filing bugs on browsers is one of the most useful things a web developer can do. When faced with a cross-browser compatibility problem, a lot of us are conditioned to just search for some quick workaround, or to keep cycling through alternatives until something works. And this is definitely what I did earlier […]
3ヶ月前
記事のアイキャッチ画像
Web component gotcha: constructor vs connectedCallback
Read the Tea Leaves
A common mistake I see in web components is this: This setupLogic() can be just about anything – subscribing to a store, setting up event listeners, etc. The teardownLogic() is designed to undo those things – unsubscribe from a store, remove event listeners, etc. The problem is that constructor is called once, when the component […]
4ヶ月前
記事のアイキャッチ画像
2023 book review
Read the Tea Leaves
Compared to previous years, my reading velocity has taken a bit of a nosedive. Blame videogames, maybe: I’ve put more hours into Civilization 6 than I care to admit, and I’m currently battling Moblins and Bokoblins in Zelda: Tears of the Kingdom. I’ve also been trying to re-learn the guitar. I basically stopped playing for […]
5ヶ月前
記事のアイキャッチ画像
Shadow DOM and the problem of encapsulation
Read the Tea Leaves
Web components are kind of having a moment right now. And as part of that, shadow DOM is having a bit of a moment too. Or it would, except that much of the conversation seems to be about why you shouldn’t use shadow DOM. For example, “HTML web components” are based on the idea that […]
5ヶ月前
記事のアイキャッチ画像
Rebuilding emoji-picker-element on a custom framework
Read the Tea Leaves
In my last post, we went on a guided tour of building a JavaScript framework from scratch. This wasn’t just an intellectual exercise, though – I actually had a reason for wanting to build my own framework. For a few years now, I’ve been maintaining emoji-picker-element, which is designed as a fast, simple, and lightweight […]
5ヶ月前
記事のアイキャッチ画像
Let’s learn how modern JavaScript frameworks work by building one
Read the Tea Leaves
In my day job, I work on a JavaScript framework (LWC). And although I’ve been working on it for almost three years, I still feel like a dilettante. When I read about what’s going on in the larger framework world, I often feel overwhelmed by all the things I don’t know. One of the best […]
6ヶ月前
記事のアイキャッチ画像
Catching errors thrown from connectedCallback
Read the Tea Leaves
Here’s a deep-in-the-weeds thing about web components that I ran into recently. Let’s say you have a humble component: And let’s say that this component throws an error in its connectedCallback: Why would it do that? I dunno, maybe it needs to validate its props or something. Or maybe it’s just having a bad day. […]
9ヶ月前
記事のアイキャッチ画像
Use web components for what they’re good at
Read the Tea Leaves
Dave Rupert recently made a bit of a stir with his post “If Web Components are so great, why am I not using them?”. I’ve been working with web components for a few years now, so I thought I’d weigh in on this. At the risk of giving the most senior-engineer-y “It depends” answer ever: […]
9ヶ月前
記事のアイキャッチ画像
My talk on CSS runtime performance
Read the Tea Leaves
A few months ago, I gave a talk on CSS performance at performance.now in Amsterdam. The recording is available online: (You can also read the slides.) This is one of my favorite talks I’ve ever given. It was the product of months (honestly, years) of research, prompted by a couple questions: What is the fastest […]
1年前
記事のアイキャッチ画像
Retiring Pinafore
Read the Tea Leaves
Five years ago, I started a journey to build a better Mastodon client – one focused on performance and simplicity. And I did! Pinafore is the main Mastodon client I’ve used myself since I first released it. After five years, though, my relationship with social media has changed, and it’s time for me to put […]
1年前