Questions
11 of 33
1Explain server-side rendering (SSR) in Next.js.
2List the benefits of Server-Side Rendering in Next.js.
3What are server components?
4How to use server components in next js?
5What is the React Server Component Payload (RSC)?
6Describe how server components are rendered.
7Describe server rendering strategies
8How can you keep Server-only Code out of the Client Environment
9What are the issues of using context provider at the root of the application?
10List dynamic functions available to server components.
11List all Dynamic APIs.
12How do we opt for Static Rendering, Dynamic Rendering and Streaming?
13Explain the difference between SSR, SSG, ISR, and CSR in Next.js. When would you choose each?
14How does getServerSideProps work internally? What is its execution context?
15What are the performance trade-offs of SSR vs SSG in a high-traffic production app?
16How does Next.js handle hydration? What is a hydration mismatch, and how do you debug it?
17What happens when getServerSideProps throws an error? How do you handle it gracefully?
18How would you architect a Next.js app that needs both personalised (SSR) and cacheable (SSG) pages at scale?
19Explain the App Router vs Pages Router SSR model differences. How does React Server Components change the SSR paradigm?
20How do React Server Components (RSC) differ from traditional SSR? Can they be used together?
21How does streaming SSR work in Next.js 13+? What role does Suspense play?
22How would you implement partial hydration or Islands Architecture in Next.js?
23Explain how Next.js handles data fetching waterfall problems in SSR and how you'd mitigate them.
24How would you implement partial hydration or Islands Architecture in Next.js?
25How do you implement caching strategies for SSR responses in Next.js? (CDN, Cache-Control, stale-while-revalidate)
26How would you reduce TTFB (Time to First Byte) in an SSR-heavy Next.js app?
27What's the difference between fetch caching in the App Router vs traditional getServerSideProps?
28How do you avoid redundant database/API calls across multiple server components on the same page?
29How do you securely handle authentication in SSR? What are the risks of passing tokens via cookies vs headers?
30How do you prevent sensitive server-side data from leaking to the client bundle?
31How would you implement role-based rendering on the server without exposing protected routes to the client?
32How do you debug SSR-only issues that don't appear in local development?
33How can we control dynamic rendering behaviour in next js?
11 / 33

List all Dynamic APIs.

Difficulty: 6/10
dynamic routing, API routes, file-system discovery

Dynamic APIs rely on information that can only be known at request time (and not ahead of time during prerendering). Using any of these APIs signals the developer's intention and will opt the whole route into dynamic rendering at the request time.

These APIs include:
  1. 1

    cookies

  2. 2

    headers

  3. 3

    connection

  4. 4

    draftMode

  5. 5

    searchParams prop

  6. 6

    unstable_noStore

Scenario Questions

0-2 years experience

  1. 1You need to add a new API endpoint that accepts a user ID in the URL, like /api/users/[id]. How would you create the file structure in a Next.js project to make this work?
  2. 2If you run the dev server and navigate to /api/products/123, which file does Next.js try to load, and what happens if that file doesn't exist?
  3. 3Write a small Node script that prints the relative paths of all files under pages/api that contain a dynamic segment (e.g., [id].js or [...slug].js).

2-5 years experience

  1. 1Your team wants to generate API documentation automatically. Explain how you would extract a list of all dynamic API routes from the codebase and what edge cases you need to handle.
  2. 2During a deployment a newly added dynamic API route returns 404. Walk me through how you'd debug the routing and verify the route is correctly recognized.

5-8 years experience

  1. 1In a large Next.js monorepo with hundreds of dynamic API routes, discuss the performance implications of scanning the filesystem at runtime versus at build time. Which approach would you choose and why?
  2. 2How would you design a versioning strategy for dynamic API routes that need to evolve without breaking existing clients, given Next.js routing constraints?
  3. 3Describe how you would enforce consistent naming and parameter validation across all dynamic API routes in a team, possibly using linting or code generation.

8+ years experience

  1. 1Your organization is migrating from a legacy Express API layer to Next.js API routes. Outline a migration plan that ensures all existing dynamic endpoints are preserved and discoverable, and discuss cross‑team coordination.
  2. 2When scaling to millions of requests, what architectural changes would you make to the handling of dynamic API routes in Next.js to avoid cold starts and maintain low latency?
  3. 3Propose a strategy for centralizing authentication and rate limiting across hundreds of dynamic API routes while keeping the codebase maintainable.

Follow-up Questions

  • What limitations does this approach have when the project uses TypeScript path aliases?
  • How would you keep the list up‑to‑date as new routes are added?
  • Can you think of any security concerns with exposing route information publicly?
Share

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.