Rendering, SSR & Hydration
Die App-Hülle wird serverseitig gerendert, auf dem Client hydriert und bildet das Laden von Routen dennoch ehrlich ab.
SSR
The initial URL is injected explicitly
The demo no longer relies on an implicit request header path inside the router call site.
Hydration
Routes may load asynchronously
This page loads with a real delay. Hydration adopts the server-rendered tree and swaps it once the loader delivers.
Shell
Toolbar and navigation stay stable
The visual frame does not reflow unexpectedly while the routed content swaps.
Startablauf
Client und SSR übergeben die initiale URL beide explizit an App.
scala
Runtime.renderToStringAsync { cursor =>
render(cursor, request, path)
}
render(hydratingCursor, request, url)