Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

cacheComponents in Next.js (canary)

38,460 görüntüleme • 1 yıl önce •via X (Twitter)

23 Yorum

Alex Sidorenko profil fotoğrafı
Alex Sidorenko1 yıl önce

There is more to cacheComponents, of course. I will create a few more vids But it seems to fix the accidental dynamic rendering problem which is huge. Rendering strategy and caching gets much more explicit

Jon profil fotoğrafı
Jon1 yıl önce

Have you checked this out yet? The cacheComponents thing isn’t working when deploying to Vercel. Locally (build/start) it works fine though.

Alex Sidorenko profil fotoğrafı
Alex Sidorenko1 yıl önce

Nope, thanks for the link. It's still experimental and in canary, I wouldn't use it in prod rn Can't wait for the stable release. It is a huge and much-needed shift towards explicit caching and rendering.

Jon profil fotoğrafı
Jon1 yıl önce

I can’t wait either. It’s been experimental for way too long. Once this is stable it’ll make Next.js great again. Just fix it already.

Leonardo Dominguez profil fotoğrafı
Leonardo Dominguez1 yıl önce

is this a future successor to PPR?

Alex Sidorenko profil fotoğrafı
Alex Sidorenko1 yıl önce

Yep, it combines ppr, dynamic IO, and "use cache" into one flag

aymen bachiri profil fotoğrafı
aymen bachiri1 yıl önce

👏

Big bro profil fotoğrafı
Big bro1 yıl önce

im so <Awaited /> pilled at this point for some reason yet still miss nextjs😭

Alex Sidorenko profil fotoğrafı
Alex Sidorenko1 yıl önce

It feels like cacheComponents fixes the most fundamental problem of the app router. But hard to tell until the stable release

Tom Sherman profil fotoğrafı
Tom Sherman1 yıl önce

If they can figure out skipping those cached components in SSR then it could save billions of dollars in compute

Dale profil fotoğrafı
Dale1 yıl önce

This seems like PPR

Zain profil fotoğrafı
Zain1 yıl önce

I like your wallpaper. Can you share it?

Alex Sidorenko profil fotoğrafı
Alex Sidorenko1 yıl önce

It's one of the backgrounds from @screenstudio

abir profil fotoğrafı
abir1 yıl önce

Unfortunately my biggest reason for using server components, was to get rid of as much loading state as possible. Not worth it to introduce this caching if it means users now have to see loading states.

Dustin profil fotoğrafı
Dustin1 yıl önce

This new feature looks promising for improving performance and developer experience. Can't wait to see how it evolves and impacts future Next.js projects.

Abundance Ken-Dickson profil fotoğrafı
Abundance Ken-Dickson1 yıl önce

Im curious: Are there any specific use cases?

Alex Sidorenko profil fotoğrafı
Alex Sidorenko1 yıl önce

Demo from the video fixes this problem

Min Chon Chi profil fotoğrafı
Min Chon Chi1 yıl önce

Looking forward to seeing the final version of cacheComponents in Next.js.

The Doctor profil fotoğrafı
The Doctor1 yıl önce

Does this cache on the local development?

Mohit Nagaraj ☄️ profil fotoğrafı
Mohit Nagaraj ☄️1 yıl önce

cacheComponents in Next.js canary looks like a solid performance boost for frequently accessed UI elements- definitely worth exploring for optimizing render times and reducing server load

Kajetan Szymczak profil fotoğrafı
Kajetan Szymczak1 yıl önce

Do I need to explicitly cache calls such as 'getUser' to cache them between multiple server components?

Alex Sidorenko profil fotoğrafı
Alex Sidorenko1 yıl önce

If you mean memoization (to avoid triggering a function multiple times during a single request), then yes. However, it works more like deduping than a persistent cache The name of this function causes a lot of confusion

Kajetan Szymczak profil fotoğrafı
Kajetan Szymczak1 yıl önce

Yes, I meant that cache (which is memoization) from react ;) So it looks very similar to ppr but without "ppr" flag

Benzer Videolar