What I've been reading (week 40, 2022)
Tags: watercooler, news, discuss
Published: 2022-10-08 07:01:02

Here's seven blog posts or other links that I liked this week…

## [Optimize long tasks](https://web.dev/optimize-long-tasks)

This all made sense to me but I'm not sure how it works in the context of using frameworks. It'd be really nice if frameworks handled this sort of thing for us. I think there is some work going on in React in this area, but I can't remember the name of the feature and a quick Google didn't bear any fruits. I think it is connected with wrapping things in `<Suspense>` to have them hydrate separately and to chunk things up that way.

## [Performant A/B Testing with Cloudflare Workers](https://philipwalton.com/articles/performant-a-b-testing-with-cloudflare-workers)

This is a great example of how edge functions can help us use less client-side JavaScript, which is great for performance and avoiding flickering interfaces caused by A/B test changes being made in the browser instead of serverside.

## [A Web Component Story](https://www.abeautifulsite.net/posts/a-web-component-story)

A blog post version of a Twitter thread that I saw this week too. I've never used Web Components and I wouldn't use them without a SSR solution, which would negate some of this post's argument about being framework agnostic, but I do like the idea of components that aren't locked into React as tools like Qwik and Solid gather some momentum. I also like the idea of Web Components providing the markup and styling and headless React/Vue/whatever libraries like [Headless UI](https://headlessui.com), [Zag](https://zagjs.com), and [Radix UI](https://www.radix-ui.com) being used to handle the state, accessibility, and interactions.

## [Async Alpine — Asynchronous Alpine component loading](https://alistairshepherd.uk/writing/async-alpine)

I'm a giant fan of [Alpine.js](https://alpinejs.dev). I introduced it to my previous agency role and we used it on sites like an upcoming https://www.london.gov.uk redesign, https://www.ltmuseum.co.uk, and https://www.visitbritainshop.com. I also use it on my personal site. One thing I've missed is the ability to lazyload individual Alpine components rather than have to load them all at the same time. Luckily, Alistair has worked on a plugin to side-step this limitation. I can't wait to add it to my personal site!

## [Positano, the Instagram capital of the world, is a terrible place to be](https://www.vox.com/the-goods/23388038/positano-travel-instagram)

Not a web-related post. "In the age of algorithms, the only way to replicate any semblance of luxury is to take the keystrokes less travelled". As a massive over-planner of travel, this post made me wonder if the plans my meticulous research ends up with are actually good plans at all 😬

## [🚀 Reflare](https://reflare.js.org)

A batteries-included reverse-proxy/load-balancing package for Cloudflare Workers, if you want to avoid the boilerplate of writing this sort of thing yourself. I've got a custom worker to proxy images from Instagram to show on my website (to avoid 'permission denied' messages due to my `origin` header being `wolstenhol.me` instead of `cdninstagram.com`), but I might replace it with this.

---

I also [tweet these as I find them (@philw_)](https://twitter.com/philw_) and post them on my personal site at https://wolstenhol.me/#reading.

What were your favourites? Was there anything you found useful?

{% user philw_ %}