A background image for the simonporter blog

Weekend Reading

More Zod goodness, lots of Next.JS news, bit of TypeScript magic, and some nice recaps about RSC's

4 min read

hello folks!

Happy Easter weekend for those celebrating! Whether it's family time, work, or stuffing your face full with your own body weight in chocolate - let's take a moment to look back over the past week.

Lot going on in the Twitter-verse as usual, quite a bit of Vercel/Next.JS news, and more fun and games with server components.

Let's jump in shall we?


Ben was at it again with server components. He's now updated his simple-rsc repo (co-authored with Dan himself) to have a fresh README and annotated all source code to help explain what's happening. Super useful if you wanted to get an idea of what's going on under the hood.

There was a very cool tip from Meng on using Midjourney for web vector graphics. I love this idea, as it's often the problem that as a frontend developer you'll have a great idea, but it needs some illustrations or vectors to really come to life. I have a hard enough time keeping up with and constantly learning JS without adding graphic design to my plate πŸ˜… this is a super nice shortcut!

Bun is going to have RSC support in v0.6.0

JP Camara blogs about their experience hunting down a performance bottleneck when using Tanstack Table, and ultimately, the 1000x speed improvements they gained with a one line change. Really love the way they set out the article and followed the train of thought. Great little read and a stellar result.

Some nice Array functions are in Stage 4,a nd already shipped with Chrome 110.

Simon reminds us he has some free Tailwind content just by signing up to his mailing list. If you're interested in dipping your toes into Tailwind, this could be worth a quick punt.

Lee released a new video detailing the new Next.JS App router (what I'm using with this blog!) which gives a nice look over the features in a quick 15 minute review.

Ben isn't the only one jumping into RSC's, vite had an update about their vite-rsc experiment which now supports mutations, very cool stuff.

Another update to the vite-rsc experiment with @cyco130. We got mutations working. So in one trip to your server, you can trigger a database update and get back the updated UI. This is one of the most compelling reasons I'm excited about RSC. Check this out, a server counter:

36
Reply

CSS Selector nesting got added to Chrome Beta this week! Slowly but surely moving it's way to the prime time.

The Adobe React Spectrum team dropped a brand new design system, React Aria Components. Unstyled, and built on top of React Aria hooks, this looks like a neat design system if you like the composable and customizable kind (rather than off the shelf such as Mantine or MUI).

Zod, more Zod. I can't get enough of Zod at the moment as I'm working on adding it to more of our production code at work at the moment. Such a neat library, and Vercel just added it into Next for router type safety. Amazing.

Speaking of Next.JS, version 13.3 was released this week with a few new cool features. I can't wait to try out the File Based Metadata API and Dynamic OG Images. Lot of buzz on Twitter for the Parallel Routes and Interception too.


This Week In React

My top picks for TWIR:

Theo's recap about the Twitter spaces with Dan, Ryan, and a bunch of other clever people, is a great watch. I πŸ’― agree with the take on Vercel/Next.JS and the hype and excitement that it brings. I also agree with the 'use client' name, but not so much 'use interactive' either πŸ˜… but, luckily, this is just naming semantics. I think something as simple as 'use browser' could be equally as descriptive. It's not that it runs in server or client, but it's targeting the browser, Theo's 'interactivity'.

I still haven't solidified my mental model on refs. They feel like the dark arts, and I'm sure I'm missing a lot of useful use cases. This article from Nadia was a good read, that I'm sure I'll need to refer back to again!

Jim writes about types in JS files by using JSDoc instead of TypeScript. While I think even for personal, quick projects, I'd much prefer to use TS, it's always interesting to see other ways of doing things. And while the JSDocs don't float my boat right now, who knows if it could be a good solution for a particular case in the future. (and hey, more zod!)


CSS Weekly is back but we're out of time for this week. See you on the other side!