How Zova's SSR Hydration Compares With Next.js Pages and App Routers
Next.js has used two distinct server-rendering models, Pages Router and App Router, so comparing Zova to it requires choosing a counterpart. Zova follows the same paradigm as Pages Router, where the server renders HTML, embeds data for the client, and the client hydrates the page, but it refines that approach further. Its render flow in ssrHandler.ts resolves the route, runs controllers to populate context, renders the tree synchronously with renderToString, executes completion callbacks, and then assembles the HTML. Data comes from backend controller beans rather than from fetch calls inside components, and request-scoped state is explicitly disposed after each render because Zova beans are singletons. The state is delivered through two HTML injection points, with critical state placed at the end of the head and bulkier, non-critical state at the end of the body.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in