Next
Pre-Rendering
- Links
- Two forms of pre-rendering
- Static Generation -
getStaticProps()
- Generates HTML at build time
- Pre-rendered HTML reused on each request
- For pages with dynamic routes,
getStaticPaths()
tells it which pages to generate
- Server-Side Rendering -
getServerSideProps()
- Generates HTML on the server on each request
- Choose which pre-rendering form to use for each page