Next.js is built by Vercel and sits on React. It is not a replacement for React—it orchestrates React apps: builds, routes, renders on the server when useful, and ships less JavaScript when possible via React Server Components.
Core capabilities
- File-system routing — folders in
app/become URLs - Hybrid rendering — static pages, server-rendered per request, or client-only islands
- Data loading at the right layer — async Server Components, Route Handlers, Server Actions
- Built-in optimizations — image/font helpers, code splitting, metadata API
- Deployment story — especially smooth on Vercel; also runs on Node, Docker, and other hosts
App Router vs Pages Router
New projects use the App Router (app/). The older Pages Router (pages/) remains in maintenance mode for legacy codebases—we cover it briefly at the end of this track. All primary lessons assume App Router.
Important interview questions and answers
- Q: Is Next.js a framework or a library?
A: A meta-framework (or full-stack React framework)—it includes routing, rendering modes, and build/deploy conventions beyond React’s view layer. - Q: Why use Next.js instead of React + React Router?
A: Less boilerplate for SSR/SSG, SEO-friendly defaults, server/client boundaries, and integrated data patterns—trade-off is framework opinion and deployment coupling. - Q: What is the App Router?
A: Theapp/directory convention with layouts, nested routes, Server Components, and special files likeloading.tsxanderror.tsx.
Self-check
- Name two features Next.js provides that you would wire manually in a Vite SPA.
- Which router does this track focus on?
Interview prep
- App Router vs Pages Router?
App Router uses
app/with RSC, layouts, and special files; Pages Router usespages/with getStaticProps/getServerSideProps—new work should prefer App Router.