Awesome.Β I think a <Button pressAction={}> component from Aria would be a killer example to motivate this pattern!
01.08.2025 19:15 β π 1 π 0 π¬ 1 π 0@samselikoff.com.bsky.social
Next.js team @vercel.com youtube.com/samselikoff
Awesome.Β I think a <Button pressAction={}> component from Aria would be a killer example to motivate this pattern!
01.08.2025 19:15 β π 1 π 0 π¬ 1 π 0Maybe I can work on this next after we get Activity merged
01.08.2025 19:08 β π 1 π 0 π¬ 0 π 0Here's another example from from @aurorascharff.no:
aurorascharff.no/posts/buildi...
She actually follows exactly the pattern Seb mentioned in that github thread with Devon
I actually do think this use case is realistic if you use the absolute positioning pattern like here: www.radix-ui.com/themes/docs/...
I have a <Spinner> I copy-paste around all my apps that does this. A <Button clickAction={}> that did this would be great for design systems to have.
a server action but the UI could flip immediately. It would also flip back if the action failed.
I think that's a good use case!
I've been wanting to help here recently. At ReactConf last year Andrew suggested libs like Radix should start accepting action* props in addition to on* event handlers.
Example would be
<Switch changeAction={updatePreference}>
If the transition/optimistic was baked in, you could pass in
He said that even if AI books became good, he still wouldn't be interested in them, because there are so many authors he still hasn't read yet. Found myself nodding along with his take.
28.07.2025 12:24 β π 1 π 0 π¬ 0 π 0Neal Stephenson said something similar recently about writing. Can't find it right now but he basically said, people read books because at some level they know a person wrote them, and that person wrote it for a reason.
28.07.2025 12:24 β π 1 π 0 π¬ 1 π 0Giving the docs for the awesome experimental <Activity> component a once-over this morning π
18.07.2025 14:43 β π 5 π 0 π¬ 1 π 0Method missing in ruby is unhinged/awesome. But can also create nightmares haha
14.06.2025 22:13 β π 8 π 0 π¬ 1 π 0Ah right I was mis-remembering inline 'use server' in <form action={}> being an rsc.
I am curious to see how the modules declarations proposal plays out. It'd be nice for the teaching story to avoid making a separate file, because the motivation for that is usually organization, not functionality.
π€
10.06.2025 17:22 β π 1 π 0 π¬ 2 π 0ThisΒ should be the hello world of RSC!
06.06.2025 15:34 β π 29 π 3 π¬ 1 π 1Great point π I guess the point isn't about syntax vs runtime, but that introducing an async function requires the whole chain to add `.then()`. That's the contamination. Seems different from hooks, which for example don't force an existing component to be rewritten.
02.06.2025 19:54 β π 2 π 0 π¬ 1 π 0Components are functions that call hooks but themselves don't become hooks. But I get your point βΒ however I still think it's different because the rules of hooks are about runtime behavior within React. Async functions contaminate the chain of code at the syntax level.
02.06.2025 17:46 β π 1 π 0 π¬ 1 π 0100% agree. The warning has been the best way to teach it
12.05.2025 17:27 β π 2 π 0 π¬ 0 π 0I'd love if this were blessed, last time I spoke with Andrew/Seb they said they were working on some new APIs/primitives for it. But to me SA fits so nicely here.
12.05.2025 17:24 β π 4 π 0 π¬ 1 π 0One of my all-time fave React talks β¨
12.05.2025 17:22 β π 1 π 0 π¬ 0 π 0If I were writing about this I would 100% focus on all of the intermediate states that are eliminated from the frontend's concerns as a result.
09.05.2025 16:06 β π 3 π 0 π¬ 1 π 0Definitely! But since itβs a library itβs not as deeply integrated into the tooling. What Iβm thinking is something like: a server action gets the type checked like normal at the calling site, but the args are βunknownβ in the implementation.
29.04.2025 22:56 β π 7 π 0 π¬ 1 π 0Yep zod is great but I'm more asking from the perspective of integrating the tooling (a la the meat of your post). Just like the compiler can tell you if you are passing in a non-serializable value to a client component, I wonder if it could tell you if the argument is untrusted.
29.04.2025 22:21 β π 4 π 0 π¬ 1 π 0a reminder for the SA implementation. Curious if you have any thoughts here!
29.04.2025 20:48 β π 2 π 0 π¬ 1 π 0opening the network tab and replaying the action sending over a number instead. So I've been doing something like
export async function likePost(unsafePostId: string) {
if (typeof unsafePostId !== 'string') throw;
const postId = unsafePostId;
// ...
}
so I get type safety for the caller but
Any thoughts on how the type system could surface security issues wrt to server action args?
If I understand correctly, typing args βΒ e.g.
"use server"
export async function likePost(postId: string) { ... }
is awesome for ensuring correct usage in the codebase, but it doesn't stop someone from
Also feel like there's nowhere to go for deeper technical discussions these days. It's a huge bummer.
23.04.2025 18:59 β π 2 π 0 π¬ 1 π 0I loved it. Feels like it could generalize to trees too
22.04.2025 18:57 β π 3 π 1 π¬ 0 π 0"Stores want normalized data, but screens want graphs"
Loved this phrasing from this instantdb essay. Lots of overlap regardless if you're local-firsting or not: www.instantdb.com/essays/next_...
Ooh that's a great one π
10.04.2025 19:38 β π 3 π 0 π¬ 1 π 0Contrived but very easy to connect to real-world situations. Markov tolstoy less so haha
10.04.2025 18:29 β π 4 π 0 π¬ 1 π 0The input/graph/clock from your transitions talk was so good, where did that one come from?
10.04.2025 18:28 β π 2 π 0 π¬ 2 π 0