Google News
logo
Next.js - Interview Questions
What is Static Site Generation in Next.js?
If you export a function called getStaticProps (Static Site Generation) from a page, Next.js will pre-render this page at build time using the props returned by getStaticProps.
export async function getStaticProps(context) {
  return {
    props: {}, // will be passed to the page component as props
  }
}

 

Advertisement