1. What is Resumability?
Resumability is the process of building an app on the server serializing it into HTML and then resuming it on the client without needing to re-execute it again
2. How does Resumability work?
- First the client sends a get request to the server
- the server rebuilds (or plays) the app
- pauses it by serializing it into the HTML
- then sends the HTML back to the client
- the client resumes the app from where the server paused it
- when a user interacts with an element
- only that event handler is requested
- and executed
3. What are the Pros and Cons of Resumability?
- instant start up time (FCP) and Time To Interactive (TTI)
- avoid doing work on the server and repeating it on the client (hydration)
- limited availability
- delayed interaction if event handler not preloaded or high network latency
4. When should you use Resumability?
- when fast Time To Interactive (TTI) is important
- when you don't want the app to grow slower as it grows bigger
- when you want client-side interactivity with SSR/SSG without hydration on the client
Perfect replacement for hydration, use everywhere except static sites