Bird
0
0

What will happen if hydration is enabled but the server-rendered HTML does not match the client component tree?

medium📝 component behavior Q5 of 15
Angular - Server-Side Rendering
What will happen if hydration is enabled but the server-rendered HTML does not match the client component tree?
AAngular will silently ignore the mismatch and continue
BThe app will crash immediately
CAngular will throw a hydration mismatch warning and re-render the component
DHydration will be skipped and events will not attach
Step-by-Step Solution
Solution:
  1. Step 1: Understand hydration mismatch behavior

    Angular detects mismatches and warns, then re-renders to fix the UI.
  2. Step 2: Check other options

    Angular does not silently ignore mismatches or crash immediately; hydration is not skipped silently.
  3. Final Answer:

    Angular will throw a hydration mismatch warning and re-render the component -> Option C
  4. Quick Check:

    Mismatch causes warning and re-render = True [OK]
Quick Trick: Mismatch triggers warning and re-render, not silent failure [OK]
Common Mistakes:
  • Believing Angular ignores mismatches silently
  • Thinking hydration skips event attachment on mismatch
  • Assuming app crashes immediately on mismatch

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes