Next.js Interview Questions & Answers
Prepare for Next.js technical interviews with 100 curated questions and answers — from fundamentals to Tech Lead. App Router, caching, SSR/SSG, and production Next.js. Each question includes a short interview answer, detailed explanation, examples, tips, and common mistakes.
Next.js interview topics
Jump into a category — each bank is independent and interview-focused.
App Router
6 Next.js questions
Server Components
7 Next.js questions
Client Components
6 Next.js questions
Rendering
6 Next.js questions
SSR
6 Next.js questions
SSG
6 Next.js questions
ISR
6 Next.js questions
Caching
7 Next.js questions
Route Handlers
6 Next.js questions
Server Actions
7 Next.js questions
Authentication
6 Next.js questions
Middleware
6 Next.js questions
Metadata
6 Next.js questions
SEO
6 Next.js questions
Performance
7 Next.js questions
Deployment
6 Next.js questions
All Next.js interview questions
App Router interview questions
View categoryWhat is the App Router in Next.js, and how does it differ from the Pages Router?
freshHow do nested layouts work in the App Router?
juniorWhat are route groups and when would you use them?
juniorExplain loading.tsx and error.tsx in a route segment.
midWhat are parallel routes and intercepting routes used for?
midAs a tech lead, how do you structure a large App Router codebase?
seniorServer Components interview questions
View categoryWhat are React Server Components (RSC) in Next.js?
freshWhat can Server Components do that Client Components cannot?
juniorWhy can't you use useState or onClick in a Server Component?
juniorHow do you share data between nested Server Components without prop drilling?
midWhat does the `server-only` package prevent?
seniorHow should you design the server/client component boundary?
seniorLead scenario: team is marking whole pages as Client Components for convenience. What do you do?
leadClient Components interview questions
View categoryWhat does the `'use client'` directive mean?
freshDo Client Components still render on the server?
juniorWhen should a component be a Client Component?
juniorHow do you pass data from a Server Component to a Client Component?
midWhat hydration mismatch issues are common in Client Components?
seniorHow does dynamic import with `next/dynamic` help Client Components?
seniorRendering interview questions
View categoryWhat rendering strategies does Next.js support?
freshWhat makes a route static vs dynamic in the App Router?
juniorExplain streaming and Suspense in Next.js rendering.
juniorWhat is Partial Prerendering (PPR) conceptually?
midHow do searchParams affect rendering?
seniorLead: how do you choose rendering strategy for a product catalog?
seniorSSR interview questions
View categorySSG interview questions
View categoryWhat is Static Site Generation (SSG) in Next.js?
freshHow do you statically generate dynamic routes?
juniorWhat content is a poor fit for pure SSG?
juniorHow does SSG affect SEO?
midBuild time exploded after adding 50k product pages. What do you do?
seniorLead: define a static content pipeline for a docs site.
seniorISR interview questions
View categoryCaching interview questions
View categoryWhat caching layers exist in Next.js App Router?
freshHow does fetch caching work by default in Next.js?
juniorWhat is React cache() used for?
juniorHow do you prevent caching of personalized pages?
midClient Router Cache vs Full Route Cache — difference?
seniorHow do cache tags design for a commerce site?
seniorLead: production shows intermittent stale dashboards. How do you diagnose?
leadRoute Handlers interview questions
View categoryWhat are Route Handlers in the App Router?
freshWhen should you use a Route Handler vs a Server Action?
juniorHow do you read JSON body and query params in a Route Handler?
midWhat are Edge vs Node runtimes for route handlers?
midHow do you secure a webhook route handler?
seniorCan Route Handlers set cookies for auth?
seniorServer Actions interview questions
View categoryWhat are Server Actions?
freshHow do you bind a Server Action to a form?
juniorWhat security issues exist with Server Actions?
midHow do Server Actions integrate with caching?
midServer Action vs Route Handler for file uploads?
seniorHow do you handle validation errors in Server Actions?
seniorLead: standardize Server Action usage across teams.
leadAuthentication interview questions
View categoryWhere should session checks happen in a Next.js app?
freshAuth.js (NextAuth) vs custom JWT cookies — trade-offs?
juniorHow do you protect Server Actions that mutate user data?
midWhat is the risk of caching authenticated RSC payloads?
midHow do OAuth callback routes fit App Router?
seniorLead: design auth for a multi-tenant Next.js SaaS.
leadMiddleware interview questions
View categoryMetadata interview questions
View categorySEO interview questions
View categoryWhat Next.js features support SEO?
freshHow do you add a sitemap in App Router?
juniorHow do you handle canonical URLs with trailing slash and UTM params?
midIs client-only rendering bad for SEO?
midHow do you implement JSON-LD in Next.js?
seniorLead: SEO regression after migrating to App Router — approach?
leadPerformance interview questions
View categoryWhich Next.js tools help image performance?
freshHow does next/font improve performance?
juniorWhat causes large client bundles in Next apps?
midHow do you optimize data fetching waterfalls?
midExplain good loading UX with streaming.
seniorWhen is Edge rendering a performance win?
leadLead: set performance budgets for a Next.js org.
leadDeployment interview questions
View categoryWhat is required to deploy a Next.js App Router app?
juniorWhat is `output: 'standalone'` useful for?
juniorHow do env vars work between build and runtime in Next?
midHow do you run Next.js behind a reverse proxy?
midPreview deployments: what should differ from production?
seniorLead: choose Vercel vs self-hosted Kubernetes for Next.
lead