Repository navigation
docs: Making something stream says each thing once, and covers failures and data from outside HttpClient - #111
Merged
Conversation
…es and data from outside HttpClient - Rules and Consequences are one list, each point once, without the movie app's details. - Templates use the angular-html fence, which Oxfmt indents properly. - When a request fails: an error state per block, what the server and the browser each do, and timeout() for a request that never answers. - Data from outside HttpClient: what resource(), fetch() and SDKs do, and a streamed() helper over SERVER_REQUEST_TRACKER and TransferState. Closes #103
This was referenced Nov 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #103.
Said once
"Rules" and "Consequences" were two lists that made the same points: the shell is sent once (three times, counting step 1), order follows the network, the placeholder paints first. They are one list now, each point said once. The movie app's details ("genre links in a 43 KB shell", "
d0", "the cast list") are gone, since the reader hasn't seen that app. Each rule now says what to do as well. The#rulesand#2-load-its-data-with-httpclientanchors the Analog guide links to are unchanged.Templates use a
```angular-htmlfence. Oxfmt formats those the Angular way, where it had flattened the```htmlone.When a request fails
This is a new section:
catchErrorinto a value for each outcome. AtoSignal()that errors throws when it's read.transferCacheInterceptorFnstoresHttpResponseevents only), and the block shows what that returns.timeout(), for a request that would otherwise keep the response open.I ran this in a scratch copy of
example-node, with a backend that answers500on the server and200in the browser. It was a dev build in headless Chrome, loaded twice. The chunk carried the error state at 2 s, the browser made the request once and showed its result, and there were no hydration errors.Data from outside
HttpClientThis is also new:
resource()andhttpResource()hold the shell back, which matches what docs: Analog's streaming SSR compared with this library, from one page sent through both #107 found.fetch()and timers hold the shell back the same way.fetch()or an SDK's promise isn't waited for: the block goes out as its loading state, and the browser loads the data itself.streamed(key, load)helper streams such data anyway. It tracksload()withSERVER_REQUEST_TRACKERon the server and puts the result inTransferState, which every chunk carries. In the browser it waits onSTREAM_HYDRATION_CLIENT.released(key)and reads the state.I checked the helper the same way, zoneless, with a promise that settles after 2 s. The chunk arrived at 2 s with the value in its state, the block hydrated, and the browser never called
load()(counter at 0, both loads). I haven't checked it with Zone.js, and the page says so.Both scratch setups are reverted;
example-nodeis unchanged.Checked
vp check: 0 errors.pnpm nx build docs: every page prerenders, and the link and heading checks pass, includingreference/core.md#server_request_tracker.