All Next.js quizzes
Intermediate30 questions60 minutes

Next.js Intermediate Quiz

Explore API routes, data fetching, dynamic routing, and middleware

Start the quiz

Sample questions from this quiz

A preview of the style and depth. Try each one, then reveal the answer — or skip straight to the timed quiz.

1. What are API Routes?

  • API configuration
  • External APIs
  • Route definitions
  • Backend API endpoints in pages/api directory
Show answer

Answer: Backend API endpoints in pages/api directory. API Routes create backend endpoints in pages/api directory. Files export handler functions handling requests.

2. How do you create an API route?

  • Create file in pages/api with handler function
  • Define in next.config.js
  • Use API builder
  • Configure in routes
Show answer

Answer: Create file in pages/api with handler function. Create a file in pages/api. Export default function: export default function handler(req, res) { res.status(200).json() }.

3. What is getServerSideProps?

  • Props function
  • Server props
  • Fetches data on each request for SSR
  • Server function
Show answer

Answer: Fetches data on each request for SSR. getServerSideProps fetches data on every request server-side. Use for dynamic data that changes frequently.

Frequently asked questions

How many questions are in this Next.js quiz?+

30 questions, with a 60-minute time limit. Every question includes a written explanation of the correct answer.

Is this Next.js quiz free?+

Yes. Every quiz on CodexQuizz is free and needs no account. You only enter a name if you choose to post your score to the leaderboard.

What level is the intermediate quiz aimed at?+

Explore API routes, data fetching, dynamic routing, and middleware

Can I use this to prepare for a Next.js interview?+

Yes. The questions cover the topics that come up in Next.js technical screens, and the explanations are written so that a wrong answer still teaches you the underlying concept.

Ready to test your Next.js?

30 questions, 60 minutes. Free, no sign-up.

Start now