Next.js Developer interview question · Most asked
What is Next.js and what problems does it solve on top of React?
Summary
Next.js is a React framework that adds file-based routing, server rendering (SSR, static generation, streaming), React Server Components, data fetching and caching, API endpoints (Route Handlers), image/font optimization and a production build pipeline.
Longer Answer
Plain React (e.g., a Vite SPA) renders in the browser and leaves routing, SEO, data loading and code splitting to you. Next.js renders on the server by default, sending HTML for fast first paint and SEO, then hydrates interactive parts. With the App Router, components are Server Components unless marked 'use client', which reduces the JavaScript shipped to the browser.
Key Points
- File-system routing (App Router and Pages Router)
- SSR, SSG, ISR and streaming
- React Server Components by default
- Route Handlers for backend endpoints
- Built-in image, font and script optimization
Explanation
What interviewers look for
Being able to explain why server rendering and RSC matter (performance, SEO, less client JS), not just listing features.
Follow-up questions
- When would a plain Vite SPA be a better choice?
More most-asked Next.js Developer questions
- How did caching defaults change in Next.js 15?
- Explain SSR, SSG, ISR and CSR in Next.js.
- How does data fetching work in the App Router?
- What are the differences between the App Router and the Pages Router?
- What is the difference between Server Components and Client Components?
- Explain the App Router file conventions: page, layout, loading, error, not-found, template and route.
- What happens, step by step, when a request reaches a Next.js App Router application?
- What are Server Actions and how do you use them for mutations?