Why can a Next.js page show a hydration mismatch only in production?

Next.js deliveryTechnical deep diveAbout 11 minutes

Understand the idea, explain it in your own words and use the rubric to find your next learning gap.

Local drafts · no account or AI calls
Sukoaa original

The idea behind the question

Hydration expects the initial client render to match the server-generated markup. Time, random values, browser-only storage, invalid nesting and environment differences can produce different initial trees.

AN ILLUSTRATIVE EXAMPLE

A component formats the current time in the browser's locale while its server markup used another timezone.

A practical way to learn it

Create a small time-dependent mismatch, then repair it with a deterministic initial label and an explicit browser enhancement. Test with different timezone settings.

Open Next.js project studio

The related tool opens separately; your interview answer stays here. Written practice is self-guided, without automatic code grading.

Build an explanation you understand

  1. State what the concept does in plain language.
  2. Apply it to the example and make your assumptions explicit.
  3. Explain a trade-off, failure case and how you would test it.
  4. Distinguish your actual experience from a proposed approach.

Further reading

Further-reading links support learning; the reference is Sukoaa-authored, not an official employer answer key.