Skip to main content

Why is hydration expensive for large SPAs?

Senior React
Quick Answer Hydration must attach event handlers to every interactive DOM node and run all components' initialization logic client-side รขโ‚ฌโ€ for a large SPA, this means executing a large JS bundle and running React reconciliation over the entire component tree. Progressive/selective hydration (React 18) helps by hydrating in priority order rather than all at once.

Answer

Browser must attach listeners, validate markup, and resolve mismatches on the main thread.
S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice