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

← All Next.js Developer questions