/ssr-and-ssg-with-nextjs

A guide to create client-side-rendered (CSR) server-side-rendered (SSR) and static-generated (SSG) web applications using React & NextJS

Primary LanguageJavaScript

CSR vs SSR vs SSG using NextJS

This is an example of the different ways you can use NextJS to build web applications.

  • Client-side rendering: /pages/csr.js
  • Server-side rendering: /pages/ssr.js
  • Static-site generation: /pages/ssg.js

Start the project by running:

npm run dev

For static-site generation run:

npm run export

This is a starter template for Learn Next.js.