Hydration is the process by which a client-side application mounts on top of an existing, server-rendered DOM.
In modern frameworks, hydration creates duplication in a number of areas: - Static content is represented both in the HTML and the JS (duplicated bytes) - Hydrating a page typically involves a similar amount of work as if the page were initially rendered on the client (duplicated work) - Data is serialized by the server in two formats: HTML and the JSON that is used to perform hydration (duplicated work and bytes)
The performance challenges of hydration have caused some to advocate avoiding Server-Side Rendering (SSR) or avoiding frameworks and forgoing declarative state management in favor of imperative scripts.
Static analysis could be the key to solving hydration without giving up the benefits of declarative state or SSR. Come see how.
Michael is a software engineer on eBay's web platform team. He has previously been a speaker at O'Reilly Fluent and various meetups. In his free time he enjoys running, indoor rowing, spikeball and slackline.
Dylan is a software engineer on eBay's web platform team. He has previously been a speaker at YYCjs. In his free time he enjoys hiking, complaining about jest, and spending time with his newborn son.