Questions
12 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?
12 / 33

How do we opt for Static Rendering, Dynamic Rendering and Streaming?

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

    Static is default in App Router for better performance, it is default behavior for fetch requests

  2. 2

    Dynamic data/ dynamic functions automatically opts routes into dynamic rendering. Add options to fetch or use dynamic functions

  3. 3

    Streaming works best with App Router and React Suspense, Use Suspense boundaries with async components

  4. 4

    Incremental Static Regeneration (ISR) offers a hybrid approach: Combine static and dynamic parts

Difficulty: 5/10
Topics: rendering strategies, data fetching, performance trade‑offs

Scenario Questions

0-2 years experience
  1. 1

    You need to add a blog post page that never changes after publishing. How would you set it up in Next.js to get the best performance?

  2. 2

    A product detail page must always show the latest price from an API. Which rendering mode would you choose and why?

2-5 years experience
  1. 1

    Your team notices that a news feed page loads slowly because the API returns a huge list. How could you use streaming in Next.js to improve perceived performance?

  2. 2

    During a sprint you switch a page from static generation to server‑side rendering and the build time drops dramatically, but the page now has higher latency. Walk me through the trade‑offs you’d evaluate.

5-8 years experience
  1. 1

    We have a high‑traffic e‑commerce site with a mix of catalog pages (mostly static) and personalized recommendations (dynamic). How would you architect the rendering strategy across the site to balance CDN cache hit rates and freshness?

  2. 2

    A recent deployment caused a memory leak in a server‑rendered page that streams data. How would you debug the issue and decide whether to fall back to static generation for that route?

8+ years experience
  1. 1

    Our legacy monolith serves HTML for SEO, but we want to migrate to Next.js gradually. Describe a migration plan that leverages static, dynamic, and streaming rendering to minimize risk and maintain SEO.

  2. 2

    Cross‑team, we need a shared rendering policy for all new pages. What guidelines would you establish for choosing between static, dynamic, and streaming, and how would you enforce them in CI/CD and documentation?

Follow-up Questions

  • What impact does ISR have on cache invalidation?
  • How would you decide between SSR and streaming for a dashboard page?
  • Can you mix static and dynamic parts on the same page? How?