Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

✍️ New blog post: "Instant Search Params with React Server Components" The result of my three-week obsession with React's new useOptimistic hook — ultimately leading me to a much richer understanding of React transitions. Hope you enjoy!

103,117 Aufrufe • vor 2 Jahren •via X (Twitter)

10 Kommentare

Profilbild von Ryan Florence
Ryan Florencevor 2 Jahren

Didn’t read it yet… is useOptimistic for the pending search param you just selected to instantly go purple instead of after the data comes?

Profilbild von Sam Selikoff
Sam Selikoffvor 2 Jahren

Correct 👍

Profilbild von Clovis Rosa
Clovis Rosavor 2 Jahren

That is the missing pice from the last podcast. Thank you very much! Next stop, YT video pleaseeee! 🙏🏾

Profilbild von Sam Selikoff
Sam Selikoffvor 2 Jahren

Bingo!

Profilbild von Devon Govett
Devon Govettvor 2 Jahren

Great post!

Profilbild von Sam Selikoff
Sam Selikoffvor 2 Jahren

Thanks Devon!

Profilbild von François Best - 🦋
François Best - 🦋vor 2 Jahren

Interesting! I built `nuqs` with the same idea in mind: keep the UI responsive, while the request is in flight and eventually settles, but that was before useOptimistic existed.

Profilbild von Sam Selikoff
Sam Selikoffvor 2 Jahren

Very cool! I think higher-level hooks like this still have their place – you could useOptimistic under the hood so it gets the behavior around transitions for free.

Profilbild von Coding in Flow
Coding in Flowvor 1 Jahr

Why does setOptimistic have to be wrapped into startTransition? I tried moving it outside and the behavior looks the same.

Profilbild von Madat Bayramov
Madat Bayramovvor 2 Jahren

Just read it, very detailed, and you've included a few good use cases. Worth to read

Ähnliche Videos