Module 10: Quiz and Assessments

Lesson 1: Quiz on Next.js Basics

Question 1: What is the default port used by a Next.js application in development mode?

  1. A) 8000
  2. B) 3000
  3. C) 5000
  4. D) 8080

Answer: B) 3000

Question 2: Which method is used to fetch data at build time in Next.js?

  1. getServerSideProps
  2. getStaticProps
  3. getInitialProps
  4. getDynamicProps

Answer: B) getStaticProps

Question 3: Which of the following is NOT a rendering method in Next.js?

  1. Static Site Generation (SSG)
  2. Server-SideRendering (SSR)
  3. Incremental Static Regeneration (ISR)
  4. Continuous Site Rendering (CSR)

Answer: D) Continuous Site Rendering (CSR)

Lesson 2: Advanced Quiz

Question 4: How can you define dynamic routes in Next.js?

  1. Using curlybraces {} in file names
  2. Using squarebrackets [] in file names
  3. Using anglebrackets <> in file names
  4. Using parentheses() in file names

Answer: B) Using square brackets

Question 5: What is the purpose of

  1. Tofetch data on the server side

in file names

in Next.js?

  1. Togenerate dynamic routes during build time
  2. Toset up API routes
  3. Tohandle CSS imports

Answer: B) To generate dynamic routes during build time

Question 6: Which command is used to start a Next.js application in production mode?

  1. npm run dev
  2. npm start
  3. npm run build
  4. npm serve

Answer: B) npm start


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *