Member-only story

NextJS: Static, Server-Side, and Client-Side Rendering

Ben Grunfeld
5 min readJul 22, 2020

Looking for a great (remote only) React Dev? Or just feel like having a chat? Visit my profile on LinkedIn and say hi! šŸ˜ƒ

In their article in February 2019, the ā€œGreat Brainsā€ at Google laid out rather verbosely what they wanted to see from future web apps, and dangled the dog-treat of improved SEO & search rankings to those who adopted Server-Side or Static Rendering:

Broadly speaking, we would encourage developers to consider server rendering or static rendering over a full rehydration approach.

Weā€™re going to look over each approach in this article and its practical implementation in Next.JS.

But firstā€¦

Terminology

Server-Side Rendering (SSR): Renders the app on the Server in response to each request, and then sends the hydrated HTML and Javascript back to the Client.

Static Rendering (SR): Renders the app at build time (e.g. when you run the npm run build command). Generally involves generating a static HTML page for every URL. This is NextJSā€™s default approach.

Client-Side Rendering (CSR): Renders the app on the Client in the browser at run time.

Pros and Cons

--

--

Ben Grunfeld
Ben Grunfeld

Written by Ben Grunfeld

Iā€™m a Front End Engineer who loves React, NextJS, and GraphQL. Looking for a developer in #Israel? Contact me at: https://www.linkedin.com/in/bengrunfeld/

No responses yet