Projects

Published on

January 22, 2022

Fundamentals of Next.js

Next.js is a framework built on top of the React.js library and provides the best development experience with a host of features like SSR and SSG, Image optimization, support for TypeScript, i18n and many more.

Learn more about the fundamentals o Next.js as we disect the features offered by the framework.

Static Site Generation (SSG)

Static Site Generation (SSG) is useful when you want to generate the HTML when the site builds. This can increase the build time but ensures that no data fetching happens when a page loads.

Use SSG when the content of your site doesn't change that often. The blog that your viewing right now uses SSG to generate all the pages during build time. When this site is deployed to Vercel, all the pages of this site gets generated.

Play with the component below to visually understand how SSG works in a Next.js application.

Loading component...

Server-side Rendering (SSR)

Server-side Rendering (SSR) is useful when you want to generate the HTML on every request.

Use SSR when the content of your site changes frequently based on the user. If the pages of your site requires authentication or authorization. you can use SSR. In SSR, the HTML of a page is generated per request.

Play with the component below to visually understand how SSG works in a Next.js application.

Loading component...

This post was updated on

February 22, 2022.

Related articles

Table of contents