Add example

This commit is contained in:
Shu Uesugi
2020-04-02 22:59:13 -07:00
parent 2a4e1b13e6
commit b20c3b504f
19 changed files with 417 additions and 8 deletions

View File

@@ -0,0 +1,11 @@
---
title: "Two Forms of Pre-rendering"
date: "2020-01-01"
---
[Next.js](https://nextjs.org/) has two forms of pre-rendering: **Static Generation** and **Server-side Rendering**. The difference is in **when** it generates the HTML for a page.
- **Static Generation (Recommended)**: The HTML is generated at **build time** and will be reused on each request.
- **Server-side Rendering**: The HTML is generated on **each request**.
Importantly, Next.js lets you **choose** which pre-rendering form you'd like to use for each page. You can create a "hybrid" Next.js app by using Static Generation for most pages and using Server-side Rendering for others.