examples/ssr_modes/README.md
This example shows the different "rendering modes" that can be used while server-side rendering an application.
See the Examples README for setup and run instructions.
Synchronous: Serve an HTML shell that includes fallback for any Suspense. Load data on the client, replacing fallback once they're loaded.
Out-of-order streaming: Serve an HTML shell that includes fallback for any Suspense. Load data on the server, streaming it down to the client as it resolves, and streaming down HTML for Suspense nodes.
async, with a very fast shell and resources that begin loading on the server.<head>)In-order streaming: Walk through the tree, returning HTML synchronously as in synchronous rendering and out-of-order streaming until you hit a Suspense. At that point, wait for all its data to load, then render it, then the rest of the tree.
Suspense. Cannot begin hydration until the entire page has loaded, so earlier pieces
of the page will not be interactive until the suspended chunks have loaded.async: Load all resources on the server. Wait until all data are loaded, and render HTML in one sweep.
<head>). Faster complete load than synchronous because async resources begin loading on server.Run cargo leptos watch to run this example.