DEV Community

Cover image for Next.js Rendering
rosa-rzi
rosa-rzi

Posted on • Edited on

Next.js Rendering

Rendering = from code to HTML

Next.js has three types of rendering:

  1. Server-Side Rendering
  2. Client-Side Rendering
  3. Static Site Generation

These can be grouped into two categories: Pre-Rendering (Server-Side and Static site) and Client-Side Rendering.

Pre-rendering fetches the data and transforms the React components before the result is sent to the client (i.e. generates it in advance on a server). Whereas Client-Side Rendering does the process on the user's device.

Now what's the difference between the two types of Pre-rendering? Server-side rendering generates the HTML of the page on a server for each request and then sends it to the client. Static site generation also generates the page on a server however, content is generated once and is stored then re-used for each request.

So how do we decide which rendering method to use with Nextjs? Stay tuned for my next post!

Cheers,
Rosa

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Top comments (0)

nextjs tutorial video

Youtube Tutorial Series 📺

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay