Skip to content

docs: Analog's streaming SSR compared with this library, from one page sent through both - #107

Merged
ChristopherPHolder merged 1 commit into
mainfrom
docs/analog-ssr-streaming
Nov 28, 2026
Merged

ChristopherPHolder merged 1 commit into
mainfrom
docs/analog-ssr-streaming

Conversation

@ChristopherPHolder

Copy link
Copy Markdown
Collaborator

A new guide in the docs app, next to the React one: Analog's streaming SSR, compared (docs/guides/analog-streaming-ssr).

Analog has an experimental streaming renderer of its own, renderStream(). It and this library mark slow parts the same way, a @defer block with a hydrate trigger, and differ in what goes over the wire. The page sends the page of Analog's own example app through both and reads the two responses.

What the page says

  • The same page through both, as a table of what arrived and when. Analog sends the head and an empty region, then the blocks as they render, then the whole document again at the end. This library sends the shell at once and the slow block by itself when its data is there.
  • Where they differ: what the first flush is, what a block waits for, where a block lands, when the page hydrates, how often a block is sent, and how each reaches into Angular (a build-time patch of @angular/core there, private APIs at runtime here).
  • Side by side, What is the same, and Which one applies.

Everything about Analog is from 3.0.0. Quotes are verbatim from its docs and RFC, and source links are pinned to the v3.0.0 tag.

How the responses were recorded

  • Analog 3.0.0 on Angular 22.3.0, built with experimental.streaming and served by its Nitro Node server.
  • This library from main, with the Node adapter, rendering the same components.
  • Each response read with fetch(), noting when every read arrived.

Two things differ between the two apps, and the page says so: here each block is wrapped in a <div>, and the slow block loads its data with HttpClient.get().

Something this turned up

The same page with httpResource() in the slow block did not stream here: it was sent in one piece once the data was in. A resource() is a pending task, and the shell waits for whenStable(). The page states this and points to inject(HttpClient).get(). The library is unchanged; whether to follow resources is a separate question.

Also

  • The page is listed in nav.ts, so it is in the sidebar, the sitemap and llms.txt.
  • "Does Angular support streaming SSR?" and "Making something stream" each link to it.

Checked

  • vp check and nx build docs pass, which covers the page's relative links and heading anchors.
  • The built page in headless Chrome at 320, 390, 820 and 1440px: no horizontal overflow, no console errors, and no axe violations (WCAG A/AA and best practice).

…e sent through both

A guide next to the React one. It sends the page of Analog's example app
through Analog 3.0.0 and through this library, and reads the two responses:
what each sends first, what a @defer block waits for, where it lands, when
the page hydrates and how each reaches into Angular.

It also says that httpResource() holds the shell back here, which the same
page showed: only direct HttpClient requests stream.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant