Two Forms of Pre-rendering

Next.js 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 is the pre-rendering method that generates the HTML at build time. The pre-rendered HTML is then reused on each request.
  • Server-side Rendering is the pre-rendering method that generates the HTML on each request.

this is a link

Importantly, Next.js lets you choose which pre-rendering form 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.

this is a quote aboute blablebalbdlasdlksdav dfjsdkhf dquv sdfgdf adfkudfmjsfdjhgasF AKDFSA ASDFSDF LJ HYBD SJF SD

Step 1: Functions Can Access Outside Variables

To understand closures, we need to be somewhat familiar with variables and functions. In this example, we declare the food variable inside the eat function:

function eat() {
let food = 'cheese'
console.log(food + ' is good')
}
eat() // Logs 'cheese is good'