# Streaming SSR

Feature 6 of 14, in the group "First-paint levers". Labels across 23 meta-frameworks: 18 1st-party, 2 Experimental, 0 Third-party, 3 Manual.

## What it is and why it matters

Streaming SSR sends the HTML in pieces. The server flushes the page shell (`<head>`, layout, loading placeholders) as soon as it is rendered, and sends each slow part when its data resolves. A buffered server waits for the slowest query before it sends the first byte, so one slow query delays the stylesheet, the fonts, and first paint. The row is ✅ when the framework's own server renderer can flush the shell before all data is ready, with a documented way to mark the deferred parts. In-order streaming counts the same as out-of-order streaming.

## Gotchas

- The status code and headers are sent with the shell. A redirect or 404 found after that point cannot change them, so frameworks fall back to a client-side redirect or an error boundary.
- A cached or prerendered page is already complete, so streaming changes nothing for it. Nuxt turns streaming off for routes with `cache`, `isr`, or `swr` rules.
- A proxy or CDN that buffers the response removes the benefit. Check that your host passes chunks through.
- Nuxt sends bots the buffered HTML by default. Pracht needs full hydration on a streamed route.

## Labels

| Framework | Label | Points |
| --- | --- | --- |
| [Next](https://framework-compare.vercel.app/frameworks/next.md) | 1st-party | 2 |
| [Nuxt](https://framework-compare.vercel.app/frameworks/nuxt.md) | Experimental | 1 |
| [SvelteKit](https://framework-compare.vercel.app/frameworks/sveltekit.md) | 1st-party | 2 |
| [SolidStart](https://framework-compare.vercel.app/frameworks/solidstart.md) | 1st-party | 2 |
| [TanStack Start (React)](https://framework-compare.vercel.app/frameworks/tanstack-start-react.md) | 1st-party | 2 |
| [TanStack Start (Solid)](https://framework-compare.vercel.app/frameworks/tanstack-start-solid.md) | 1st-party | 2 |
| [Pracht](https://framework-compare.vercel.app/frameworks/pracht.md) | 1st-party | 2 |
| [Waku](https://framework-compare.vercel.app/frameworks/waku.md) | 1st-party | 2 |
| [Ember](https://framework-compare.vercel.app/frameworks/ember.md) | Manual | 0 |
| [Astro](https://framework-compare.vercel.app/frameworks/astro.md) | 1st-party | 2 |
| [React Router](https://framework-compare.vercel.app/frameworks/react-router.md) | 1st-party | 2 |
| [Qwik City](https://framework-compare.vercel.app/frameworks/qwik-city.md) | 1st-party | 2 |
| [Angular (SSR)](https://framework-compare.vercel.app/frameworks/angular.md) | Manual | 0 |
| [Marko](https://framework-compare.vercel.app/frameworks/marko.md) | 1st-party | 2 |
| [Fresh](https://framework-compare.vercel.app/frameworks/fresh.md) | Manual | 0 |
| [Analog](https://framework-compare.vercel.app/frameworks/analog.md) | Experimental | 1 |
| [Vike](https://framework-compare.vercel.app/frameworks/vike.md) | 1st-party | 2 |
| [RedwoodSDK](https://framework-compare.vercel.app/frameworks/redwoodsdk.md) | 1st-party | 2 |
| [Remix 3](https://framework-compare.vercel.app/frameworks/remix.md) | 1st-party | 2 |
| [Void (React)](https://framework-compare.vercel.app/frameworks/void-react.md) | 1st-party | 2 |
| [Void (Vue)](https://framework-compare.vercel.app/frameworks/void-vue.md) | 1st-party | 2 |
| [Void (Svelte)](https://framework-compare.vercel.app/frameworks/void-svelte.md) | 1st-party | 2 |
| [Void (Solid)](https://framework-compare.vercel.app/frameworks/void-solid.md) | 1st-party | 2 |

## How to enable it in each framework

### Next

Label: **1st-party** (2 of 2 points).

Streaming is built into the App Router. Add a [`loading.tsx`](https://nextjs.org/docs/app/guides/streaming) file next to a page, or wrap a slow component in `<Suspense>`; the fallback is sent with the shell and the content follows in the same response.

```tsx
import { Suspense } from 'react'

export default function Page() {
  return (
    <Suspense fallback={<p>Loading feed...</p>}>
      <PostFeed />
    </Suspense>
  )
}
```

*Adapted from [the Next streaming guide](https://nextjs.org/docs/app/guides/streaming) (imports of the page's own components omitted).*

### Nuxt

Label: **Experimental** (1 of 2 points).

Set [`experimental.ssrStreaming: true`](https://nuxt.com/docs/4.x/guide/going-further/experimental-features). The server sends the shell (`<head>`, styles, preload hints, entry scripts) first and then streams the body with Vue's `renderToWebStream`. `routeRules` can switch it off per route.

```ts
export default defineNuxtConfig({
  experimental: {
    ssrStreaming: true,
  },
  routeRules: {
    '/no-stream/**': { streaming: false },
  },
})
```

*From [the Nuxt experimental features docs](https://nuxt.com/docs/4.x/guide/going-further/experimental-features).*

### SvelteKit

Label: **1st-party** (2 of 2 points).

Return a promise from a server `load` without awaiting it ([streaming with promises](https://svelte.dev/docs/kit/load)). The page renders with the awaited data, and each promise is streamed to the browser when it resolves; `{#await}` shows the placeholder.

```js
export async function load({ params }) {
  return {
    comments: loadComments(params.slug),
    post: await loadPost(params.slug)
  };
}
```

*From [the SvelteKit `load` docs](https://svelte.dev/docs/kit/load) (comments omitted).*

### SolidStart

Label: **1st-party** (2 of 2 points).

With `ssr: true`, pages stream from the server ([choose a rendering mode](https://docs.solidjs.com/guides/choose-a-rendering-mode)): the shell is sent first, then one HTML fragment per `<Loading>` boundary as its data resolves ([performance guide](https://docs.solidjs.com/guides/performance#server-rendering-and-streaming)).

```ts
plugins: [solid({ start: true, ssr: true })],
```

```tsx
<Loading fallback={<p>Loading product…</p>}>
  <article>
    <h1>{product().name}</h1>
  </article>
</Loading>
```

*Adapted from [the Solid docs](https://docs.solidjs.com/guides/choose-a-rendering-mode) (`vite.config.ts` line and a shortened `<Loading>` example).*

### TanStack Start (React)

Label: **1st-party** (2 of 2 points).

The default server entry uses `defaultStreamHandler` ([server entry point](https://tanstack.com/start/latest/docs/framework/react/guide/server-entry-point)), so [streaming SSR](https://tanstack.com/router/latest/docs/framework/react/guide/ssr) is on without a flag. Return a promise from a loader without awaiting it and render it with [`<Await>`](https://tanstack.com/router/latest/docs/framework/react/guide/deferred-data-loading).

```tsx
export const Route = createFileRoute('/posts/$postId')({
  loader: async () => {
    const slowDataPromise = fetchSlowData()
    const fastData = await fetchFastData()
    return { fastData, deferredSlowData: slowDataPromise }
  },
})
// ...
<Await promise={deferredSlowData} fallback={<div>Loading...</div>}>
  {(data) => <div>{data}</div>}
</Await>
```

*Adapted from [the TanStack Router deferred data loading guide](https://tanstack.com/router/latest/docs/framework/react/guide/deferred-data-loading) (comments omitted).*

### TanStack Start (Solid)

Label: **1st-party** (2 of 2 points).

The same setup applies: `defaultStreamHandler` from `@tanstack/solid-start/server` ([server entry point](https://tanstack.com/start/latest/docs/framework/solid/guide/server-entry-point)) and unawaited loader promises rendered with `<Await>` ([deferred data loading](https://tanstack.com/router/latest/docs/framework/solid/guide/deferred-data-loading)).

Example of building it yourself:

The server entry renders with `defaultStreamHandler`. A loader returns a slow promise without awaiting it, and `<Await>` shows its fallback until the promise resolves and the rest of the HTML streams in.

```tsx
// src/server.ts
import { createStartHandler, defaultStreamHandler } from '@tanstack/solid-start/server'
import { createServerEntry } from '@tanstack/solid-start/server-entry'

const processRequest = createStartHandler(defaultStreamHandler)
export default createServerEntry({ fetch: (request, opts) => processRequest(request, opts) })
```

```tsx
// src/routes/$id.tsx
import { createFileRoute, Await } from '@tanstack/solid-router'

export const Route = createFileRoute('/$id')({
  loader: async ({ params }) => ({
    book: await getBook(params.id),       // awaited: in the first chunk
    reviews: getReviews(params.id),       // not awaited: streamed later
  }),
  component: BookPage,
})

function BookPage() {
  const data = Route.useLoaderData()
  return (
    <>
      <h1>{data().book.title}</h1>
      <Await promise={data().reviews} fallback={<p>Loading reviews…</p>}>
        {(reviews) => <ul>{reviews.map((r) => <li>{r.text}</li>)}</ul>}
      </Await>
    </>
  )
}
```

Source: [TanStack Start: Server Entry Point](https://tanstack.com/start/latest/docs/framework/solid/guide/server-entry-point) · [TanStack Router: Deferred Data Loading](https://tanstack.com/router/latest/docs/framework/solid/guide/deferred-data-loading)

### Pracht

Label: **1st-party** (2 of 2 points).

Set the route option [`streaming: true`](https://pracht.resynapse.dev/docs/data-loading) and wrap slow loader values in `defer()`. It needs `render: "ssr"` and full hydration. Pages-router files use `export const STREAMING = true`.

```ts
route("/product/:id", () => import("./routes/product.tsx"), {
  render: "ssr",
  streaming: true,
});
```

*From [the Pracht data loading docs](https://pracht.resynapse.dev/docs/data-loading) ("Streaming the document").*

### Waku

Label: **1st-party** (2 of 2 points).

Waku renders React Server Components to a stream, and a `<Suspense>` boundary around an async server component sends its fallback with the shell. There is no flag. The docs describe this only in passing: the [redirects and not-found guide](https://waku.gg/guides/redirects-and-not-found) covers what happens "inside a Suspense boundary after the shell has already been sent".

Example of building it yourself:

Make the slow part an async server component and wrap it in `<Suspense>`. Waku sends the page shell with the fallback first, then streams the pagination once its count query resolves.

```tsx
// src/pages/index.tsx
import { Suspense } from 'react';

export default async function HomePage({ query }: { query: string }) {
  const searchParams = parseSearchParams(queryToRecord(query));
  const books = await getBooksPage(toBookQuery(searchParams));
  return (
    <div>
      <BookGrid books={books} searchParams={searchParams} />
      <footer>
        <Suspense fallback={<BookPaginationSkeleton />}>
          <BookPagination searchParams={searchParams} />
        </Suspense>
      </footer>
    </div>
  );
}

// src/features/book/components/book-pagination.tsx
export async function BookPagination({ searchParams }: { searchParams: SearchParams }) {
  const totalResults = await getBooksCount(toBookFilters(toBookQuery(searchParams)));
  // … render page links
}
```

Source: [Waku: Redirects and not found](https://waku.gg/guides/redirects-and-not-found) · [React: Suspense](https://react.dev/reference/react/Suspense)

### Ember

Label: **Manual** (0 of 2 points).

No streaming render is documented. The [FastBoot user guide](https://ember-fastboot.com/docs/user-guide) and the community [`vite-ember-ssr`](https://github.com/evoactivity/vite-ember-ssr) layer this port uses both render the whole page and then send it.

Example of building it yourself:

Return a `ReadableStream` from the request handler. It sends the top of the HTML template right away, then waits for the Ember render and sends the rest. The status code is fixed at 200 once the first chunk is out.

```js
// server/handle-request.js
import { assembleHTML } from 'vite-ember-ssr/server';

const HEAD_MARKER = '<!-- VITE_EMBER_SSR_HEAD -->';
// … in handleFetch, for page requests
const template = await getTemplate();
const early = template.slice(0, template.indexOf(HEAD_MARKER));
const encoder = new TextEncoder();

const body = new ReadableStream({
  async start(controller) {
    controller.enqueue(encoder.encode(early)); // charset, viewport, favicon
    const emberApp = await getEmberApp();
    const rendered = await emberApp.renderRoute(`${url.pathname}${url.search}`, { settledTimeout: 8000 });
    controller.enqueue(encoder.encode(assembleHTML(template, rendered).slice(early.length)));
    controller.close();
  },
});
return new Response(body, { headers: { 'content-type': 'text/html; charset=utf-8' } });
```

Source: [vite-ember-ssr](https://github.com/evoactivity/vite-ember-ssr) · [MDN: ReadableStream](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)

### Astro

Label: **1st-party** (2 of 2 points).

On-demand pages use HTML streaming: the document is sent in chunks, in order, as each component renders, so `<head>` and the top of the page go out before a slow `await` further down finishes. Nothing to enable. Move slow fetches into child components so they do not block the parts above them; `server:defer` server islands cover content that should arrive out of order. ([on-demand-rendering](https://docs.astro.build/en/guides/on-demand-rendering/#html-streaming))

Example of building it yourself:

On-demand pages stream by default. Put a slow fetch in its own component: the HTML above it is sent while it waits.

```astro
---
// src/pages/books/[id].astro
export const prerender = false; // render on demand
import Layout from "../../layouts/Layout.astro";
import BookDetail from "../../components/BookDetail.astro";
import Reviews from "../../components/Reviews.astro";
---
<Layout title="Book">
  <BookDetail id={Astro.params.id} />
  <!-- head, header and BookDetail are already sent while Reviews awaits -->
  <Reviews id={Astro.params.id} />
</Layout>
```

```astro
---
// src/components/Reviews.astro
const res = await fetch(`https://api.example.com/books/${Astro.props.id}/reviews`);
const reviews = await res.json();
---
<ul>{reviews.map((r) => <li>{r.text}</li>)}</ul>
```

Source: [Astro: On-demand rendering, HTML streaming](https://docs.astro.build/en/guides/on-demand-rendering/#html-streaming), [Astro: Streaming for page performance](https://docs.astro.build/en/recipes/streaming-improve-page-performance/)

### React Router

Label: **1st-party** (2 of 2 points).

Return a promise from a `loader` without awaiting it, then render it with `<Await resolve={...}>` inside `<Suspense>`; the awaited data renders first and the rest streams in. The loader must return an object with keys, not a single promise. ([suspense](https://reactrouter.com/how-to/suspense))

Example of building it yourself:

The loader awaits the critical data and returns the slow promise as-is. The component renders that promise with `<Await>` inside `<Suspense>`, so the fallback goes out first.

```tsx
// app/routes/book.tsx
import { Suspense } from 'react'
import { Await } from 'react-router'
import type { Route } from './+types/book'

export async function loader({ params }: Route.LoaderArgs) {
  const reviews = getReviews(params.id) // NOT awaited
  const book = await getBook(params.id)
  return { book, reviews }
}

export default function Book({ loaderData }: Route.ComponentProps) {
  return (
    <>
      <h1>{loaderData.book.title}</h1>
      <Suspense fallback={<p>Loading reviews…</p>}>
        <Await resolve={loaderData.reviews}>
          {(reviews) => <ul>{reviews.map((r) => <li key={r.id}>{r.text}</li>)}</ul>}
        </Await>
      </Suspense>
    </>
  )
}
```

Source: [React Router: Streaming with Suspense](https://reactrouter.com/how-to/suspense)

### Qwik City

Label: **1st-party** (2 of 2 points).

Return an async function from `routeLoader$` and render it with `<Resource>`; Qwik streams the HTML up to that point and sends the rest when the function resolves. Streaming is in order, tuned by the `streaming.inOrder` render options. ([streaming-deferred-loaders](https://qwik.dev/docs/cookbook/streaming-deferred-loaders/), [qwik-server](https://qwik.dev/api/qwik-server/))

Example of building it yourself:

Return an async function from `routeLoader$` and render it with `<Resource>`. The HTML above the resource streams first, and the rest follows when the data resolves.

```tsx
// src/routes/books/[id]/index.tsx
import { Resource, component$ } from '@builder.io/qwik'
import { routeLoader$ } from '@builder.io/qwik-city'

export const useReviews = routeLoader$(({ params }) => {
  // returning a function defers it: rendering doesn't wait here
  return async () => {
    const res = await fetch(`https://api.example.com/books/${params.id}/reviews`)
    return (await res.json()) as { id: string; text: string }[]
  }
})

export default component$(() => {
  const reviews = useReviews()
  return (
    <>
      <h1>Reviews</h1>
      <Resource
        value={reviews}
        onPending={() => <p>Loading…</p>}
        onResolved={(list) => <ul>{list.map((r) => <li key={r.id}>{r.text}</li>)}</ul>}
      />
    </>
  )
})
```

Source: [Qwik: Streaming deferred loaders](https://qwik.dev/docs/cookbook/streaming-deferred-loaders/)

### Angular (SSR)

Label: **Manual** (0 of 2 points).

No streaming render documented. The SSR guide describes rendering the page to a complete HTML document and then sending it, and the word "stream" does not appear in it. ([ssr](https://angular.dev/guide/ssr))

Example of building it yourself:

Angular renders the whole document before sending it. To get bytes out sooner, flush a fixed `<head>` from the Express handler while Angular renders, then send the rest of Angular's HTML. The status code and head are fixed before rendering starts.

```ts
// src/server.ts
import { AngularNodeAppEngine } from '@angular/ssr/node';
import express from 'express';

const app = express();
const angularApp = new AngularNodeAppEngine();
// Copy the <head> of the built index.server.html, with its hashed CSS link.
const HEAD = `<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Books</title>
<link rel="stylesheet" href="/styles-HASH.css"></head>`;

app.use(async (req, res, next) => {
  if (!req.accepts('html')) return next();
  res.status(200).type('html').write(HEAD); // sent before Angular renders
  const response = await angularApp.handle(req);
  const html = response ? await response.text() : '<body></body>';
  res.end(html.slice(html.indexOf('</head>') + '</head>'.length)); // body only
});
```

Source: [Angular: Server-side rendering](https://angular.dev/guide/ssr)

### Marko

Label: **1st-party** (2 of 2 points).

Streaming is the default. Marko flushes HTML up to each `<await>` and sends the rest when its promise resolves; a `<try>` with `@placeholder` opts into out-of-order streaming and shows the placeholder first. ([streaming](https://markojs.com/docs/explanation/streaming))

Example of building it yourself:

The handler passes the queries to the page as unresolved promises. Each `<await>` sits in a `<try>` with `@placeholder`, so the skeleton is sent first and the grid streams in when its promise resolves.

```ts
// src/routes/+handler.ts
export const GET = Run.GET((ctx, next) => {
  const params = parseSearchParams(ctx.search ?? {});
  return next({
    books: loadBooksPage(params),   // not awaited
    count: loadBooksCount(params),  // not awaited
  });
});
```

```marko
// src/routes/+page.marko
<try>
  <await|books|=$global.data.books>
    <book-grid books=books/>
  </await>
  <@placeholder><book-grid-skeleton/></@placeholder>
  <@catch|err|><error-state title="Can't load books" body=err.message/></@catch>
</try>
```

Source: [Marko: Streaming](https://markojs.com/docs/explanation/streaming)

### Fresh

Label: **Manual** (0 of 2 points).

No streamed page rendering documented. The docs show a `ReadableStream` returned from an API handler only, and describe no way to flush part of a page early. ([common-patterns](https://usefresh.dev/docs/examples/common-patterns), [data-fetching](https://usefresh.dev/docs/concepts/data-fetching))

Example of building it yourself:

Write the route handler yourself and return a `ReadableStream` of HTML. The shell and a placeholder go out first. When the query resolves, the handler sends the rendered grid and a small script that swaps it in. This page skips Fresh's layouts and islands.

```tsx
// routes/books.tsx
import { define } from "@/utils.ts";
import { renderToString } from "preact-render-to-string";

export const handler = define.handlers({
  GET() {
    const enc = new TextEncoder();
    const body = new ReadableStream({
      async start(controller) {
        controller.enqueue(enc.encode(
          `<!doctype html><html><head><link rel="stylesheet" href="/styles.css"></head>` +
          `<body><main id="grid">Loading…</main>`,
        ));
        const books = await getBooks();
        controller.enqueue(enc.encode(
          `<template id="grid-html">${renderToString(<BookGrid books={books} />)}</template>` +
          `<script>document.getElementById("grid").replaceWith(document.getElementById("grid-html").content)</script></body></html>`,
        ));
        controller.close();
      },
    });
    return new Response(body, { headers: { "Content-Type": "text/html; charset=utf-8" } });
  },
});
```

Source: [Fresh: Common patterns](https://usefresh.dev/docs/examples/common-patterns)

### Analog

Label: **Experimental** (1 of 2 points).

The streaming SSR page says it "is experimental and opt-in". Set `analog({ experimental: { streaming: true } })` in the Vite config and export `renderStream(AppComponent, config)` from `@analogjs/router/server` in `main.server.ts`; it needs Angular 21+ and Vite 6+, and builds on incremental hydration (`@defer` blocks). The default SSR path stays buffered. ([streaming-ssr](https://analogjs.org/docs/features/server/streaming-ssr))

Example of building it yourself:

Turn on the experimental flag and export `renderStream` from the server entry. It needs Angular 21+ and Vite 6+.

```ts
// vite.config.ts
import analog from '@analogjs/platform';
import { defineConfig } from 'vite';

export default defineConfig({
  plugins: [analog({ experimental: { streaming: true } })],
});

// src/main.server.ts
import { renderStream } from '@analogjs/router/server';
import { config } from './app/app.config.server';
import { AppComponent } from './app/app.component';

export default renderStream(AppComponent, config);
```

Source: [Analog: Streaming SSR](https://analogjs.org/docs/features/server/streaming-ssr)

### Vike

Label: **1st-party** (2 of 2 points).

Set `stream: true` in a `+config.js`, for the whole app or per page; it needs `ssr: true` and one of `vike-react`, `vike-vue` or `vike-solid`. The default is `false`. The deferred parts are the UI framework's own async boundaries: `vike-react` streams through `react-streaming`, and `vike-react-query`'s `useSuspenseQuery()` shows a `<Suspense>` fallback while the rest of the page renders. ([stream](https://vike.dev/stream), [streaming](https://vike.dev/streaming), [vike-react-query](https://github.com/vikejs/vike-react/tree/main/packages/vike-react-query))

Example of building it yourself:

Set `stream: true` in `+config`. With `vike-react-query`, a component that calls `useSuspenseQuery()` streams in later, and `withFallback()` gives it a loading fallback.

```tsx
// pages/+config.ts
import vikeReact from 'vike-react/config'
import vikeReactQuery from 'vike-react-query/config'

export default { extends: [vikeReact, vikeReactQuery], stream: true }

// pages/book/@id/Reviews.tsx
import { useSuspenseQuery } from '@tanstack/react-query'
import { withFallback } from 'vike-react-query'

export const Reviews = withFallback(
  ({ id }: { id: string }) => {
    const { data } = useSuspenseQuery({
      queryKey: ['reviews', id],
      queryFn: () => fetch(`/api/reviews/${id}`).then((r) => r.json()),
    })
    return <ul>{data.map((r: { id: string; text: string }) => <li key={r.id}>{r.text}</li>)}</ul>
  },
  () => <p>Loading reviews…</p>,
)
```

Source: [Vike: stream](https://vike.dev/stream) · [vike-react-query README](https://github.com/vikejs/vike-react/tree/main/packages/vike-react-query)

### RedwoodSDK

Label: **1st-party** (2 of 2 points).

Server components are "rendered on the server as HTML and then streamed to the client". Wrap an async server component in `<Suspense fallback={...}>` to show a loading state while its data is fetched. Nothing to enable. ([react-server-components](https://docs.rwsdk.com/core/react-server-components))

Example of building it yourself:

Make a server component async and wrap it in `<Suspense>`. The page shell streams first with the fallback, and the list streams in when the query resolves.

```tsx
// src/app/pages/todos/TodoPage.tsx
import { Suspense } from "react";

export async function Todos({ ctx }) {
  const todos = await db.todo.findMany({ where: { userId: ctx.user.id } });
  return <ol>{todos.map((todo) => <li key={todo.id}>{todo.title}</li>)}</ol>;
}

export async function TodoPage({ ctx }) {
  return (
    <div>
      <h1>Todos</h1>
      <Suspense fallback={<div>Loading...</div>}>
        <Todos ctx={ctx} />
      </Suspense>
    </div>
  );
}
```

Source: [RedwoodSDK: React Server Components](https://docs.rwsdk.com/core/react-server-components)

### Remix 3

Label: **1st-party** (2 of 2 points).

Give a `<Frame src="...">` a `fallback`; the fallback is part of the initial HTML, and when the frame's route finishes Remix streams its HTML and replaces the fallback. The `render()` middleware from `remix/middleware/render` streams the component tree. A frame without a fallback blocks the first chunk. ([streaming-ui-with-frames](https://docs.remix.run/streaming-ui-with-frames/))

Example of building it yourself:

The `render()` middleware streams the component tree. A `<Frame>` with a `fallback` sends the fallback in the first chunk, then streams the frame route's HTML when it is ready.

```tsx
// app/router.ts
import { render } from "remix/middleware/render";
import { createRouter } from "remix/router";
import { assets } from "./assets.ts";

export const router = createRouter({
  middleware: [render({ assets })],
});

// app/actions/books/show-page.tsx
<main>
  <h1>{book.title}</h1>
  <Frame
    src={routes.books.reviews.href({ bookId: book.id })}
    fallback={<p>Loading reviews…</p>}
  />
</main>
```

Source: [Remix: Streaming UI with frames, stream a fallback first](https://docs.remix.run/streaming-ui-with-frames/)

### Void (React)

Label: **1st-party** (2 of 2 points).

Wrap slow loader values in `defer()`: "The page renders immediately and receives the result when it is ready." The page reads the value with `use()` under `<Suspense>`; "React Pages requires React 19 and uses streaming SSR for the initial deferred shell". `defer('group', fn)` resolves several props from one call. ([loaders](https://void.cloud/guide/pages-routing/loaders), [pages adapters](https://void.cloud/reference/api/pages))

Example of building it yourself:

Wrap a slow value in `defer()`. The page is sent first, and the value follows later in the same response. Read it with `use()` under `<Suspense>`; React Pages needs React 19.

```ts
// pages/[id].server.ts
import { defer, defineHandler } from 'void'

export const loader = defineHandler(async (c) => ({
  book: await getBook(c.req.param('id')),
  reviews: defer(() => getReviews(c.req.param('id'))),
}))
```

```tsx
// pages/[id].tsx
import { Suspense, use } from 'react'

function ReviewList({ reviews }: { reviews: Promise<Review[]> }) {
  return <Reviews items={use(reviews)} />
}

export default function Book({ book, reviews }: Props) {
  return (
    <>
      <h1>{book.title}</h1>
      <Suspense fallback={<p>Loading reviews…</p>}><ReviewList reviews={reviews} /></Suspense>
    </>
  )
}
```

Source: [Void: Deferred props](https://void.cloud/guide/pages-routing/loaders#deferred-props) · [React: use](https://react.dev/reference/react/use)

### Void (Vue)

Label: **1st-party** (2 of 2 points).

Wrap slow loader values in `defer()`: "The page renders immediately and receives the result when it is ready." The Vue page gets a `{ loading, value, error }` object and renders the loading branch first; the value is streamed into the same response when it resolves. `defer('group', fn)` resolves several props from one call. ([loaders](https://void.cloud/guide/pages-routing/loaders), [pages adapters](https://void.cloud/reference/api/pages))

Example of building it yourself:

Wrap a slow value in `defer()`. The page is sent first, and the value follows later in the same response. The Vue page gets an object with `loading`, `value` and `error`.

```ts
// pages/[id].server.ts
import { defer, defineHandler } from 'void'

export const loader = defineHandler(async (c) => ({
  book: await getBook(c.req.param('id')),
  reviews: defer(() => getReviews(c.req.param('id'))),
}))
```

```vue
<!-- pages/[id].vue -->
<script setup lang="ts">
const props = defineProps<Props>()
</script>

<template>
  <h1>{{ props.book.title }}</h1>
  <p v-if="props.reviews.loading">Loading reviews…</p>
  <p v-else-if="props.reviews.error">Reviews failed to load.</p>
  <Reviews v-else :items="props.reviews.value" />
</template>
```

Source: [Void: Deferred props](https://void.cloud/guide/pages-routing/loaders#deferred-props)

### Void (Svelte)

Label: **1st-party** (2 of 2 points).

Wrap slow loader values in `defer()`: "The page renders immediately and receives the result when it is ready." The Svelte page gets a `{ loading, value, error }` object and renders the loading branch first; the value is streamed into the same response when it resolves. `defer('group', fn)` resolves several props from one call. ([loaders](https://void.cloud/guide/pages-routing/loaders), [pages adapters](https://void.cloud/reference/api/pages))

Example of building it yourself:

Wrap a slow value in `defer()`. The page is sent first, and the value follows later in the same response. The Svelte page gets an object with `loading`, `value` and `error`.

```ts
// pages/[id].server.ts
import { defer, defineHandler } from 'void'

export const loader = defineHandler(async (c) => ({
  book: await getBook(c.req.param('id')),
  reviews: defer(() => getReviews(c.req.param('id'))),
}))
```

```svelte
<!-- pages/[id].svelte -->
<script lang="ts">
  let { book, reviews } = $props()
</script>
<h1>{book.title}</h1>
{#if reviews.loading}<p>Loading reviews…</p>{:else}<Reviews items={reviews.value} />{/if}
```

Source: [Void: Deferred props](https://void.cloud/guide/pages-routing/loaders#deferred-props)

### Void (Solid)

Label: **1st-party** (2 of 2 points).

Wrap slow loader values in `defer()`: "The page renders immediately and receives the result when it is ready." The Solid page gets a `{ loading, value, error }` object and renders the loading branch first; the value is streamed into the same response when it resolves. `defer('group', fn)` resolves several props from one call. ([loaders](https://void.cloud/guide/pages-routing/loaders), [pages adapters](https://void.cloud/reference/api/pages))

Example of building it yourself:

Wrap a slow value in `defer()`. The page is sent first, and the value follows later in the same response. The Solid page gets an object with `loading`, `value` and `error`.

```ts
// pages/[id].server.ts
import { defer, defineHandler } from 'void'

export const loader = defineHandler(async (c) => ({
  book: await getBook(c.req.param('id')),
  reviews: defer(() => getReviews(c.req.param('id'))),
}))
```

```tsx
// pages/[id].tsx
export default function Book(props: Props) {
  return (
    <>
      <h1>{props.book.title}</h1>
      {props.reviews.loading ? <p>Loading reviews…</p> : props.reviews.error ? <p>Reviews failed to load.</p> : <Reviews items={props.reviews.value} />}
    </>
  )
}
```

Source: [Void: Deferred props](https://void.cloud/guide/pages-routing/loaders#deferred-props)

---

HTML version: https://framework-compare.vercel.app/features/streaming-ssr · All pages: https://framework-compare.vercel.app/llms.txt · Data: https://framework-compare.vercel.app/api/index.json
