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

getServerSideProps Syntax

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

Items to put in order

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

Correct order:

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