Resumability: Qwik's Alternative to Hydration
What You'll Learn
You'll discover how Qwik eliminates hydration entirely by serializing application state and resuming execution exactly where the server left off.
The Hydration Problem Qwik Solves
Traditional SSR frameworks (including React) face a fundamental problem: the server renders HTML, but the client must "replay" all component logic to recreate the application state and attach event listeners. This is hydration, and it's expensive — the client re-executes JavaScript that the server already ran.
What Resumability Means
Resumability is Qwik's radical alternative: instead of re-running components on the client, Qwik serializes the entire application state (component boundaries, event listeners, closures) directly into the HTML. When the browser loads the page, it doesn't need to execute any JavaScript until an interaction happens.
Think of it like pausing a video game and saving your progress. When you resume, you don't replay the entire game from the beginning — you pick up exactly where you stopped. Qwik does this with web applications.
How It Works
Qwik embeds serialized state in <script type="qwik/json"> tags in the HTML. When a user clicks a button, Qwik loads only the tiny handler function needed for that specific interaction. The framework knows where you were without re-running anything.
React must hydrate the entire component tree before interactivity. Qwik loads zero JavaScript upfront and resumes on-demand.
The Performance Win
- Time to Interactive: Instant (no hydration delay)
- JavaScript Execution: Zero until interaction
- Scalability: Large apps don't slow initial load
Key Takeaway: Resumability eliminates hydration by serializing application state into HTML, allowing Qwik to resume execution without re-running components — achieving instant interactivity with zero upfront JavaScript cost.