Sam Selikoff's Avatar

Sam Selikoff

@samselikoff.com

Next.js team @vercel.com youtube.com/samselikoff

3,392
Followers
77
Following
140
Posts
28.06.2024
Joined
Posts Following

Latest posts by Sam Selikoff @samselikoff.com

For the e2e locators specifically, can you use something like playwright's getByRole? Those automatically filter by visibility (and therefore are also robust to other UI patterns like tabbed navs or disclosures/accordions).

03.02.2026 19:10 πŸ‘ 3 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
[cacheComponents] Activity component route preservation causes significant breakage in application logic, UI behavior and E2E tests Β· Issue #86577 Β· vercel/next.js Link to the code that reproduces this issue https://github.com/SorooshGb/next16-activity-breakage-repro To Reproduce This reproduction demonstrates 3 issues caused by Activity-component–driven rout...

We're discussing an opt-out since especially for existing code it can cause quite a few issues. I wrote more about the reason behind the change here if you're interested: github.com/vercel/next....

03.02.2026 19:09 πŸ‘ 2 πŸ” 0 πŸ’¬ 3 πŸ“Œ 0

Same, but a few years ago I moved to either trap bar (which doesn't go as far down) or rack pulls, and haven't had issues since. Have you tried either?

02.02.2026 20:45 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Trifonic - NightRun (feat. MindBuffer)
Trifonic - NightRun (feat. MindBuffer) YouTube video by TrifonicOfficial

Oh man Jon Hopkins, what a throwback. Did you ever get into Trifonic? www.youtube.com/watch?v=UA3W...

26.01.2026 17:45 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
Introducing RSC Explorer β€” overreacted My new hobby project.

i wrote about my new hobby project overreacted.io/introducing-...

18.12.2025 16:50 πŸ‘ 73 πŸ” 5 πŸ’¬ 3 πŸ“Œ 1
Video thumbnail

Been working on a new microsite to teach Next.js patterns, and I just published a new one:

"Sharing data with Client Components"

See how to use promises to keep your page unblocked so it can be rendered (or prerendered) as early as possible.

Enjoy!

next-16-recipes.vercel.app/sharing-data...

18.12.2025 18:29 πŸ‘ 27 πŸ” 4 πŸ’¬ 0 πŸ“Œ 0

Absolutely. Already had an idea that seb showed me, using a server component for saved messages and a client component for an optimistic message. The optimistic state is not just data it’s a whole component. Would be so cool to see it in this playground.

15.12.2025 17:46 πŸ‘ 5 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Basically I've seen a lot of people not understand that you can write your own client functions when using the action prop. Think it'd be good to show it off more.

action={async (formData) => {
const message = await greet(formData.get('name'))
setMessage(message)
})

15.12.2025 17:18 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

Btw, I really hate that uAS's reducer shape contaminates server actions with prevState first arg. I kinda think examples like this should show an inline client function that calls setState with the response, before jumping to uAS. Similar to how you'd useState before useReducer. Wdyt?

15.12.2025 17:15 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

"Ahh... look at that. The response is <Timer>. So <ColorTimer> gets rendered, the RSC tree melts away, and we return <Timer> with a new prop. Makes perfect sense."

15.12.2025 17:12 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

This is so good man. Could do a lot to demystify RSCs and Server Actions.

I love this one. "Ok so I'm calling a server action that returns <ColorTimer>... wtf is happening?"

15.12.2025 17:12 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Agree with you that flashing skeletons can be a very annoying UX, but the alternative is not being able to cache the initial UI, and Next evaluates the tradeoff in favor of speed here by default.

Totally fine to wrap body in Suspense and generate the full response at request time though.

02.12.2025 19:22 πŸ‘ 3 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Added some thoughts to your issue.

For this one, it's less about it being async and more about it being IO. IO isn't cachable. That's why even sync APIs like Math.random or new Date() trigger the warning. The model wants you to keep your IO separate so that it knows what can be cached.

02.12.2025 19:22 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

revalidateTag (the new form, with the second arg) allows the next read to be stale, then triggers a background rerender.

30.10.2025 23:32 πŸ‘ 3 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

But the way the team intends it to be thought of is as "updating the UI". It's a "pull" of the freshest data in the context of a mutation that the current session kicked off. So I read it more like, "update the UI for this tag".

30.10.2025 23:32 πŸ‘ 3 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Right, but updateTag basically triggers a read. So in a Server Action, you get the mutation + fresh RSC render in the same round trip.

The name updateTag was a bit strange to me at first, because as you say it's not really "updating the tag"...

30.10.2025 23:32 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Basically refresh() is as if you hit ο£Ώ+R, but we can send the updated payload in the same round-trip as your mutation. In the past folks used revalidatePath('/') for this but that was overloaded & had the additional behavior of expiring caches.

30.10.2025 07:01 πŸ‘ 3 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Yes exactly πŸ‘ updateTag is for updating "tagged cached data" (i.e. data that's been "use cache"'d as well as cacheTag'd).

refresh() is for rerendering the RSC tree. So any dynamic data will be refetched (but any cached data that isn't expired won't be).

30.10.2025 07:01 πŸ‘ 6 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0

updateTag is for updating cached data, but if you're just mutating and want the dynamic data on the page to update refresh is what you want

30.10.2025 01:19 πŸ‘ 2 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0

Yep understood + agree. Working on a canonical tutorial.

Server-side version of refresh is new, previously folks were using revalidatePath() to accomplish something similar but now that we have it it's the right way to refresh dynamic RSCs. Basically makes your UI look as if you ο£Ώ+R.

27.10.2025 17:27 πŸ‘ 10 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

The reason I'd enable cacheComponents even if you're not using "use cache" is because it enables other behaviors like dynamic-by-default, which make Next overall easier + more predictable to work with. For new apps I would think of it as the default mode of Next 16.

27.10.2025 14:59 πŸ‘ 6 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
Functions: refresh | Next.js API Reference for the refresh function.

I would enable cacheComponents in next.config.ts, and just build your app as a dynamic/uncached app to start (i.e. don't worry about "use cache").

Then, after a mutation in a server action, call `refresh()`:

nextjs.org/docs/app/api...

That will send over the updated UI in the same round trip.

27.10.2025 14:58 πŸ‘ 4 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0

Ah looks good now, hadn't checked since earlier πŸ‘

02.10.2025 18:22 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
React React is the library for web and native user interfaces. Build user interfaces out of individual pieces called components written in JavaScript. React is designed to let you seamlessly combine compone...

I think it's CDN, I saw sebbie mention is for the sandboxes on react.dev. They work if you fork them.

02.10.2025 16:50 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

The clock example from Dan's talk was great. I feel like there's some contrived example that can communicate that... maybe a "subway network" demo? I feel like that's relatable (at least for me as a new yorker ^_^)

02.10.2025 16:12 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Mic quality? That’s the thing I’m most curious about!

25.09.2025 13:09 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

It's so tasteful though, and they always still load fast, don't have layout shift, don't highjack scroll, etc. I think they do a really good job of capturing your taste and personality while being exemplary of a professional. I'd wager they really help with sales!

24.09.2025 20:31 πŸ‘ 4 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Fantastic work man! Always love the detail in your landing pages.

24.09.2025 16:09 πŸ‘ 5 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

It's going to be insanely awesome. Cannot freaking wait

23.09.2025 13:51 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Oh yeahhhh! Nice!

23.09.2025 13:49 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0