Rhys

Rhys

@rhys.dev

23 | Building | Google-index Discord Content http://answeroverflow.com | Tweet to commit ratio http://shiptalkers.dev | PostHog query client http://typelytics.rhyssul.com

762 followers169 following46 posts

Pinned

If I follow you on Twitter but not on here yet please shoot me a DM / reply to this tweet, want to make sure I get everyone

Super excited to give this talk! A lot of what I'll be covering works for every platform, if you're in SF come by!

All Things Web@allthingsweb.dev

Let's kick off 2025! 🎉 RSVP for our first All Things Web event of the year on Jan 28 at Sanity. @rhys.dev will give a talk, From Zero to Viral, and share how to leverage tech Twitter for career and product growth. Super excited for the talk and to see you all there! lu.ma/yra4hkvq

If we don’t get the JavaScript trademark freed from oracle, I propose renaming it to Celsius Java - Old language made by boomers who drink coffee & program to a requirements doc Celsius - Gen Z who drink energy drinks & ship based on vibes

It'd be nice if someone follows you from a starter pack, it tells you what starter pack they used Also, love the starter pack concept it's such a good way to get traction on the platform

Small detail about the new Planetscale homepage, there's no pop in for their Sign in / Dashboard link, it's included in first HTML payload that's sent to the client A dive into how this works and why it's interesting (sub 50ms SSRing!)

View full thread

There is one small improvement that could be made if they were using Next (probably possible in Remix too, don't know the implementation though) By using middleware.ts instead of doing the dynamic content in the page itself, their content would be able to be cached

This pattern has it's own tradeoffs though, as it's less flexible and now you have to maintain two page files You still have to hit an edge function, although edge middleware might be faster? Unsure on that one, it's also slightly cheaper but when we're talking about $0.65 vs $2 it doesn't matter

Small detail about the new Planetscale homepage, there's no pop in for their Sign in / Dashboard link, it's included in first HTML payload that's sent to the client A dive into how this works and why it's interesting (sub 50ms SSRing!)

View full thread

Looking at the auth cookie, I think they're using JWTs for auth which should mean they're able to skip doing a DB lookup for the user and so the only executing cost they're paying is the trip from the client to the edge function and back

Overall this is a really good implementation, it's flexible where if they need to add more dynamic elements they can, and also they can do page view tracking in the edge functions to get accurate view counts Edge functions are essentially free and it adds to their polish

Small detail about the new Planetscale homepage, there's no pop in for their Sign in / Dashboard link, it's included in first HTML payload that's sent to the client A dive into how this works and why it's interesting (sub 50ms SSRing!)

View full thread

Next up, the response headers what can we learn from those? They're SSRing each page load, you can tell this by how the age is 0 and the X-Vercel-Cache is MISS. Along with this, the site is hosted on Vercel meaning they're either using serverless functions or edge functions

Loading the page from us-west it loads in 50ms-100ms Swapping my location with a VPN to Australia, the initial HTML takes 200-250ms to load This makes me think they're SSRing on the edge as if you compare those numbers to remix-on-the-edge.vercel.app/edge they're very similar

Small detail about the new Planetscale homepage, there's no pop in for their Sign in / Dashboard link, it's included in first HTML payload that's sent to the client A dive into how this works and why it's interesting (sub 50ms SSRing!)

First, a quick look at the tech stack Wappalyzer says it's Next and Remix, inspecting the HTML payload which is what we care about, it's using Remix

Bing is still not showing any new search results from Reddit Going on about 3 months now of no new content indexed

Left over Twitter habits have me not including link in main tweet over here as well Will be nice for that to return

Introducing Tenant Kit 🌐 A collection of documentation, components, and resources for building multi-tenant applications Starting things off with a shadcn Vercel custom domain configurator block, a full stack copy paste component that just works

One of my favorite patterns that doesn't get enough love is dataloader It allows you to fetch data like normal, but it automatically batches & caches the calls This allows you to fetch data from completely different locations in your app with the speed of one call

Rhys reposted

ok so based on my testing, if Parent has 'use cache' and takes children then children indeed don’t invalidate it <Parent> <Child /> {/* more dynamic */} </Parent> but like HOW?.... i don’t get it

You are up to date.