
Next.js Fundamentals
App Router, Server Components, Client Components, file-based routing, layouts, pages
1What is the App Router in Next.js?
What is the App Router in Next.js?
Answer
The App Router is the new routing system in Next.js 13+ based on the app/ directory. It replaces the Pages Router and introduces Server Components by default, shared layouts, and a more flexible routing model with file conventions like page.tsx, layout.tsx and loading.tsx.
2How to create an /about route in the App Router?
How to create an /about route in the App Router?
Answer
In the App Router, each folder represents a route segment. To create /about, create app/about/page.tsx. The page.tsx file is required to make a route publicly accessible. Without this file, the folder will only be a path segment without a displayed page.
3What is the default behavior of components in the App Router?
What is the default behavior of components in the App Router?
Answer
In the App Router, all components are Server Components by default. They execute only on the server and send no JavaScript to the client, improving performance. To use client features (hooks, events), you must add the 'use client' directive at the top of the file.
How to create a dynamic route /posts/[id] in the App Router?
What is the purpose of the layout.tsx file in the App Router?
+22 interview questions
Other React / Next.js interview topics
JavaScript Essentials
React Fundamentals
React Hooks
Component Lifecycle
React Router
State Management with Context
Forms & Controlled Components
Data Fetching & API
React Query (TanStack Query)
Styling & CSS-in-JS
TypeScript with React
Next.js Data Fetching
Next.js Server Actions
Next.js Routing & Navigation
Next.js API Routes
Next.js Metadata & SEO
Next.js Middleware & Auth
React Testing
Zustand State Management
React Performance Optimization
Error Boundaries & Error Handling
Advanced React Patterns
Next.js Advanced Features
Next.js Deployment & Production
Architecture & Design Patterns
React Server Components
Next.js Internationalization
React Security & Best Practices
Master React / Next.js for your next interview
Access all questions, flashcards, technical tests, code review exercises and interview simulators.
Start for free