Loading video...

Video Failed to Load

Go Home

Static vs. Dynamic rendering in Next.js

105,379 views • 2 years ago •via X (Twitter)

11 Comments

Delba's profile picture
Delba2 years ago

Static rendering provides an affordable (no runtime server compute), performant (no runtime server compute), and reliable (no runtime server compute) starting point. You can intentionally opt into rendering at runtime when you need to by using dynamic APIs.

Delba's profile picture
Delba2 years ago

RE: the "RSC doesn't require a server" discourse™️ Static rendering at build time would not be possible if React Server Components required a runtime server to work.

Emanuel Peire's profile picture
Emanuel Peire2 years ago

Wonderful explanation 🫶

ProEvilz's profile picture
ProEvilz2 years ago

How do you create the videos? Is it After Effects?

Delba's profile picture
Delba2 years ago

I use @Remotion

Leibel Hecht's profile picture
Leibel Hecht2 years ago

Beware, if you use certain props (like searchParams) the rendering will be quietly changed to be dynamic and it may be difficult to debug by static isn't working

Delba's profile picture
Delba2 years ago

Yes, using dynamic functions/APIs that depend on runtime information signals the developer's intention and opts the page (today) or section (future via Partial Prerendering) into dynamic rendering. More:

Sander Vispoel's profile picture
Sander Vispoel2 years ago

This looks beautiful!

rafael r. camargo's profile picture
rafael r. camargo2 years ago

That’s soo good, wow!

Juntao Qiu | 邱俊涛's profile picture
Juntao Qiu | 邱俊涛2 years ago

Thanks for the clear illustrations (and animations), they look amazing. Are these videos available on YouTube, too?

Delba's profile picture
Delba2 years ago

🫡

Related Videos