Put in order · Next.js course · Module 1: Next.js Configuration

getStaticProps Syntax

Arrange the syntax of the getStaticProps function in the Pages Router (pages/ folder)

Items to put in order

  • return { props } }
  • export async
  • function getStaticProps()
  • {
Show the answer

Correct order:

  1. export async
  2. function getStaticProps()
  3. {
  4. return { props } }