Boarding pass · Next.js Advanced
Next.js · Advanced interview
An AI mock interview for senior Next.js engineers. Reason about React Server Components internals, the App Router's caching layers, partial prerendering and performance, and production concerns like server-action security.
- Voice interview
- Live feedback
- Browser-only
- No installation required
Your report · sample
AI Readiness Score
Finish the mock and get this report — scored on content and English, with concrete tips and a model answer for every question, plus a study plan.
Your flight path
Five steps to interview-ready.
From a quick warm-up to a personalised study plan — here's the whole loop, and what you get at each gate.
Step 01
Preparation
Skim the topics and warm up — you're briefed before takeoff.
Step 02
AI Interview
A realistic AI interviewer asks tailored questions — answer by voice or text.
Step 03
Instant Score
Finish and get a 0–100 readiness score across content and English.
Step 04
AI Feedback
Concrete tips and a rewritten model answer for every response.
Step 05
Study Plan
A personalised plan targets your weakest areas — so the next run scores higher.
Preview the AI demo
See one answer scored, end to end.
The whole loop on sample data — question, your answer, instant feedback and a study plan. Hover to pause.
Interviewer · Question 1
“Tell me about yourself.”
Who it's for
- Senior engineers owning Next.js architecture
- Devs optimizing large Next apps
- Anyone targeting senior/lead Next roles
- Engineers debugging caching and hydration
What you'll practice
- RSC internals and the server-client boundary
- The four caching layers and invalidation
- Partial prerendering and performance
- Server-action security and production caching
Topics covered
What this level expects.
RSC internals
- RSC payload
- Serialization boundary
- Hydration
Caching layers
- Four caches
- Invalidation
- Partial Prerendering
Performance
- Bundle size
- Avoiding waterfalls
- Core Web Vitals
Production
- Server Action security
- Edge vs Node trade-offs
- Stale-data pitfalls
Practice questions
12 questions, with model answers.
Read them, then run the live mock to answer out loud and get scored. Tap any question to reveal a model answer.
01How do React Server Components actually work in Next.js?RSC internals
Server Components render on the server to a serialized description of the UI (the RSC payload) — not HTML strings but a tree referencing client components by id. Next streams that payload; the client uses it for the initial HTML and to reconcile, then hydrates only the client components, downloading just their JS. This is why server components ship no JS and can touch server resources: their code never reaches the browser.
02What can and can't cross the server-to-client component boundary?RSC internals
Props passed from a server component to a client component must be serializable — plain objects, arrays, strings, numbers, and Server Action function references — but not arbitrary functions, class instances, or things like Dates-as-behaviour. You also can't import a server-only module into a client component. The boundary is a serialization boundary, so you design props to be plain data and keep non-serializable logic on the correct side.
03What causes hydration mismatches and how do you avoid them?RSC internals
A mismatch happens when the server-rendered HTML differs from the client's first render — common causes are using Date.now()/Math.random(), reading window or localStorage during render, locale/timezone differences, or invalid HTML nesting. Fixes: move browser-only logic into useEffect, gate it behind a mounted flag, use suppressHydrationWarning sparingly for inherently dynamic values, and keep render pure and deterministic. The render must produce the same output on both sides.
04Explain the caching layers in the Next.js App Router.Caching layers
There are roughly four: the Request Memoization cache (dedupes identical fetches within one render), the Data Cache (persists fetch results across requests/deploys, controlled by revalidate/no-store), the Full Route Cache (caches the rendered RSC payload/HTML of static routes at build), and the client-side Router Cache (caches visited route segments in the browser for fast back/forward). Knowing which layer a piece of data lives in tells you why it's stale and how to refresh it.
05How do you invalidate or opt out of each cache?Caching layers
Data Cache: cache: 'no-store' or revalidate, and on-demand revalidateTag/revalidatePath. Full Route Cache: making the route dynamic (cookies/headers/no-store or dynamic = 'force-dynamic') or revalidating. Request Memoization is automatic and per-render. Router Cache: router.refresh(), revalidatePath, or it expires by time. Stale-data bugs usually come from not realizing several of these stack, so you target the specific layer.
06What is Partial Prerendering (PPR)?Caching layers
Partial Prerendering serves a static prerendered shell instantly and streams in the dynamic parts (wrapped in Suspense) within the same route, instead of forcing the whole page to be either static or dynamic. You get the speed of static for the common shell and the freshness of dynamic for personalized bits, in one response. It blurs the old static-vs-dynamic boundary at the component level.
07How do you keep the client bundle small in a Next.js app?Performance
Keep components as Server Components by default and push 'use client' as far down the tree as possible so only truly interactive leaves ship JS. Lazy-load heavy client components with next/dynamic, avoid pulling large libraries into client components, and watch for accidentally making a whole subtree client by marking a high-level component. Analyze with the bundle analyzer and move data-fetching/formatting to the server.
08How do you avoid data-fetching waterfalls in the App Router?Performance
Sequential awaits create waterfalls; instead kick off independent fetches in parallel (start the promises, then await together with Promise.all), hoist shared data, and use Suspense so independent sections stream concurrently rather than blocking each other. Request memoization helps dedupe, but the main lever is not awaiting one request before starting an unrelated one. Preloading patterns can warm data a component will need.
09How do you optimize Core Web Vitals in Next.js?Performance
For LCP: use next/image with priority on the hero, optimize fonts with next/font to avoid layout shift and blocking, and prefer static/streamed server rendering so content paints fast. For CLS: reserve space for images/ads and avoid injecting content above existing content. For INP: minimize client JS and heavy hydration. Measure with real-user data and Lighthouse, then target the worst metric.
10How do you secure Server Actions?Production
Treat a Server Action like a public HTTP endpoint: anyone can invoke it, so authenticate and authorize inside the action, validate and sanitize all input (e.g. with Zod), and never trust hidden form fields. Next adds CSRF protections (same-origin checks) for actions, but you still enforce per-user permissions and rate limits yourself. The mistake is assuming an action is safe because it's only called from your UI.
11What are the trade-offs of the Edge runtime in production?Production
Edge gives low latency globally and fast cold starts, great for auth checks, redirects, personalization, and lightweight APIs. But it has a limited runtime (no native Node APIs, smaller size/time limits), database drivers may not work or need HTTP/edge-compatible clients, and debugging differs. You weigh global latency benefits against API/dependency constraints, often keeping data-heavy work on the Node runtime.
12A page is serving stale data in production — how do you debug it?Production
Work through the caching layers: is the fetch in the Data Cache (missing no-store/revalidate)? Is the route in the Full Route Cache because it's static when it should be dynamic? Is the browser's Router Cache showing an old segment (needs router.refresh or revalidatePath after a mutation)? Reproduce with the layer in mind, check whether mutations call revalidateTag/Path, and confirm the fetch's cache options. Most 'stale' bugs are a layer you forgot to invalidate.
Preparation tips
Walk in ready.
- Be able to name and invalidate each caching layer
- Explain what can cross the server-client boundary
- Have a concrete 'why is my data stale' debugging story
- Treat Server Actions as public endpoints — validate and authorize
Ready for the real thing?
Run a 6-question Next.js mock interview, answer out loud, and get a readiness score with tips and model answers.
More advanced interviews