Skip to main content

20-Minute Next.js Screen

Use a strict timer. Answer aloud before reading the scoring notes.

Minute 0–2 β€” Intro​

Interviewer: Give me your mental model of a modern Next.js App Router application.

Strong answer should mention:

route tree
Server Components by default
narrow Client Components
server-owned data
Server Actions / Route Handlers by contract
cache + request-time boundaries
production build/deployment

Red flag: β€œNext.js is React with SSR.”

Minute 2–4 β€” Server vs Client​

Interviewer: What does 'use client' actually do?

Follow-ups:

  • Does every child become a Client Component?
  • Can a Client Component appear in initial server-rendered HTML?
  • What is the performance cost of moving the boundary upward?

Score 3 if the candidate explains the module graph, composition of server-produced children, hydration and client-JS blast radius.

Minute 4–6 β€” Data​

Interviewer: A Server Component needs product data. Would you call your own /api/products Route Handler?

Expected:

default no
β†’ call DAL/query directly
β†’ HTTP only when it is a real external/public contract

Follow-up: When would client-side fetching still be reasonable?

Minute 6–8 β€” Caching​

Interviewer: Explain React cache() vs Next.js persistent caching.

Expected distinction:

React cache β†’ render/server memoization
Next cache/Cache Components β†’ cross-request freshness/invalidation model
Router Cache β†’ browser navigation cache

Follow-up: What makes a cached result safe for multiple tenants?

Minute 8–10 β€” Mutations​

Interviewer: Server Action or Route Handler for these?

  1. Rename a project from the web UI.
  2. Stripe-style webhook.
  3. Mobile app public API.
  4. Internal business rule reused by both.

Strong mapping:

1 Action
2 Handler
3 Handler/API
4 command/use-case below adapters

Minute 10–12 β€” Routing​

Interviewer: Layout vs template? Hard vs soft navigation?

Score for preservation/remount semantics and route-tree reconciliation, not memorized syntax.

Minute 12–14 β€” Security​

Interviewer: Proxy checks the session before /admin. Is the admin route secure?

Expected:

not by Proxy alone
β†’ enforce authorization at DAL/command/handler/action
β†’ test valid-user/wrong-resource/role negatives

Minute 14–16 β€” Performance​

Interviewer: Lighthouse looks good, but real users report slow interactions. What next?

Strong answer:

field RUM / INP
browser performance trace
client JS/render blast radius
third parties
long sessions/memory
real device segmentation

Minute 16–18 β€” Production scenario​

Interviewer: A Server Action updates the DB, but the UI is stale until a hard reload. Debug it.

Expected layers:

DB canonical state
server cache/tag/path invalidation
RSC refresh
Router Cache
optimistic/local state

Red flag: immediate β€œcall router.refresh everywhere.”

Minute 18–20 β€” Closing question​

Interviewer: What changed in how you think about Next.js as you became more senior?

Strong themes:

ownership over API choice
subtree rendering over static/SSR labels
security before cache
production topology matters
framework core vs platform behavior
stable vs experimental contracts

Scoring​

Score 0–3 for:

framework fundamentals
server/client ownership
data/cache correctness
mutation boundaries
security
performance/debugging
communication

Pass​

Average β‰₯ 2.0 and no security score below 2.

Strong senior signal​

Average β‰₯ 2.5 with concise, current, version-aware answers and at least one concrete production example.