Skip to content

Stream frames with declarative out-of-order directives - #11585

Draft
jacob-ebey wants to merge 1 commit into
mainfrom
ooo-streams
Draft

Stream frames with declarative out-of-order directives#11585
jacob-ebey wants to merge 1 commit into
mainfrom
ooo-streams

Conversation

@jacob-ebey

Copy link
Copy Markdown
Member

Non-blocking <Frame> streaming now uses the declarative out-of-order streaming directives instead of a runtime-driven template swap. Pending fallbacks are wrapped in <?start name="ID"> / <?end name="ID"> inside
the existing <!-- rmx:f:ID --> markers, and resolved content streams as <template for="ID"> (was <template id="ID">).

Browsers that natively process the directives perform the DOM swap with no JavaScript. Other browsers use a small MutationObserver polyfill that run() installs automatically, which moves <template for> content
into its region and removes the directives. In both cases the runtime no longer extracts templates itself; it hydrates the resolved region after the swap, while reloads and navigation continue to reconcile fetched-stream content through the template bus.

Non-blocking `<Frame>` streaming now uses the declarative out-of-order
streaming directives instead of a runtime-driven template swap. Pending
fallbacks are wrapped in `<?start name="ID">` / `<?end name="ID">`
inside
the existing `<!-- rmx:f:ID -->` markers, and resolved content streams
as `<template for="ID">` (was `<template id="ID">`).

Browsers that natively process the directives perform the DOM swap with
no JavaScript. Other browsers use a small MutationObserver polyfill
that `run()` installs automatically, which moves `<template for>`
content
into its region and removes the directives. In both cases the runtime no
longer extracts templates itself; it hydrates the resolved region after
the swap, while reloads and navigation continue to reconcile
fetched-stream content through the template bus.
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Preview Build Available

A preview build has been created for this PR. You can install it using:

pnpm install "remix-run/remix#preview/pr-11585&path:packages/remix"

This preview build will be updated automatically as you push new commits.

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