Shu
@shud.in
6.2K followers 140 following 160 posts
only raw thoughts here (like very raw, with typos)
Posts Media Videos Starter Packs
Reposted by Shu
ricky.fm
Ricky @ricky.fm · Dec 2
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.
shud.in
Shu @shud.in · Dec 3
it's supported!
shud.in
Shu @shud.in · Dec 3
haha yea, I should also make it a blog post too
shud.in
Shu @shud.in · Nov 30
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
shud.in
Shu @shud.in · Nov 30
there were "use asm" and others

stackoverflow.com/questions/69...
shud.in
Shu @shud.in · Nov 29
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
shud.in
Shu @shud.in · Nov 29
that works, but in my case it’s more like preloading an iframe for the next navigation (not the current page)
shud.in
Shu @shud.in · Nov 28
yeah I think that might be why they removed `link rel=preload as=document` :/
shud.in
Shu @shud.in · Nov 28
yeah, but how do I *pre*load it? like developer.mozilla.org/en-US/docs/W... but for iframes
shud.in
Shu @shud.in · Nov 28
what’s the way to preload an <iframe> in 2024?

all I found on the internet was lazy loading it
shud.in
Shu @shud.in · Nov 26
Flighty
Reposted by Shu
addyosmani.bsky.social
Trying View Transitions in Next.js using @shud.in’s next-view-transitions library. Love how straight-forward this was.

github.com/shuding/next...
shud.in
Shu @shud.in · Nov 24
thanks Addy!
shud.in
Shu @shud.in · Nov 24
next time!
Reposted by Shu
ricky.fm
Ricky @ricky.fm · Nov 23
don’t useEffect, but if you must, don’t call setState in it
shud.in
Shu @shud.in · Nov 23
haha I love faster machines but… I love the recent React Scan + GitHub.com improvements more
shud.in
Shu @shud.in · Nov 23
nooooo I don’t want to lose the joy of optimizing our code 🥹
shud.in
Shu @shud.in · Nov 23
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 :/
shud.in
Shu @shud.in · Nov 23
ohhhh
shud.in
Shu @shud.in · Nov 23
const get = use (v) => {
side effects
return () => {
cleanup v
return v’
}
}

// useState + useEffect in one hook? maybe a language
shud.in
Shu @shud.in · Nov 18
SF!