Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

✍️ 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,102 görüntüleme • 2 yıl önce •via X (Twitter)

10 Yorum

Ryan Florence profil fotoğrafı
Ryan Florence2 yıl önce

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?

Sam Selikoff profil fotoğrafı
Sam Selikoff2 yıl önce

Correct 👍

Clovis Rosa profil fotoğrafı
Clovis Rosa2 yıl önce

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

Sam Selikoff profil fotoğrafı
Sam Selikoff2 yıl önce

Bingo!

Devon Govett profil fotoğrafı
Devon Govett2 yıl önce

Great post!

Sam Selikoff profil fotoğrafı
Sam Selikoff2 yıl önce

Thanks Devon!

François Best - 🦋 profil fotoğrafı
François Best - 🦋2 yıl önce

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.

Sam Selikoff profil fotoğrafı
Sam Selikoff2 yıl önce

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.

Coding in Flow profil fotoğrafı
Coding in Flow1 yıl önce

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

Madat Bayramov profil fotoğrafı
Madat Bayramov2 yıl önce

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

Benzer Videolar