Shu
banner
shud.in
Shu
@shud.in
only raw thoughts here (like very raw, with typos)
Reposted by Shu
This is actually really funny to me. While react developers are criticizing RSCs because it's viewed as abandoning SPAs, anti-react developers are criticizing react SPAs by citing issues from the 2010s solved by RSC.
December 2, 2024 at 9:43 PM
it's supported!
December 3, 2024 at 4:39 PM
haha yea, I should also make it a blog post too
December 3, 2024 at 4:38 PM
December 3, 2024 at 4:00 PM
The making of cobe.vercel.app. I’ll see if I have time to improve the perf & add marker overlay to it during the holidays
November 30, 2024 at 4:34 PM
there were "use asm" and others

stackoverflow.com/questions/69...
November 30, 2024 at 1:44 AM
November 29, 2024 at 3:30 AM
it’s still the same, the issue is that when moving an iframe node in DOM tree, all its state gets lost so the preloaded cache will be gone 😢

the core problem is that there’s no way for a new iframe element to reuse any existing cache
November 29, 2024 at 3:28 AM
that works, but in my case it’s more like preloading an iframe for the next navigation (not the current page)
November 29, 2024 at 1:54 AM
yeah I think that might be why they removed `link rel=preload as=document` :/
November 28, 2024 at 11:56 AM
yeah, but how do I *pre*load it? like developer.mozilla.org/en-US/docs/W... but for iframes
November 28, 2024 at 11:54 AM
what’s the way to preload an <iframe> in 2024?

all I found on the internet was lazy loading it
November 28, 2024 at 2:59 AM
Flighty
November 26, 2024 at 12:51 AM
Reposted by Shu
Trying View Transitions in Next.js using @shud.in’s next-view-transitions library. Love how straight-forward this was.

github.com/shuding/next...
November 24, 2024 at 10:29 PM
thanks Addy!
November 24, 2024 at 10:38 PM
next time!
November 24, 2024 at 6:27 PM
Reposted by Shu
don’t useEffect, but if you must, don’t call setState in it
November 23, 2024 at 4:20 PM
haha I love faster machines but… I love the recent React Scan + GitHub.com improvements more
November 23, 2024 at 6:01 PM
nooooo I don’t want to lose the joy of optimizing our code 🥹
November 23, 2024 at 5:53 PM
I recently switched from a 8GB RAM MacBook Air to a 36GB M4 Pro. Things become much smoother (literally ship 2x more PRs) but I wish someday I can instead optimize my tools and go back to my 8GB Air :/
November 23, 2024 at 5:37 PM
ohhhh
November 23, 2024 at 5:32 PM
const get = use (v) => {
side effects
return () => {
cleanup v
return v’
}
}

// useState + useEffect in one hook? maybe a language
November 23, 2024 at 6:36 AM
Video Game Club
Historical records of the Video Game Club
sf-game-club.vercel.app
November 23, 2024 at 3:44 AM
SF!
November 18, 2024 at 4:58 PM
November 18, 2024 at 4:57 PM