Skip to content

History / Streaming SSR

Revisions

  • docs: defer() formal API + /ssr subpath docs across 8 pages Updates the wiki to reflect the defer() + /ssr work shipped in the main repo's #609 / #610 / #611 branch. Streaming-SSR.md (large rewrite): - Opening removes "Real-Router has no streaming-specific API" — Real- Router now ships defer() + injectDeferredScripts as a formal cross- adapter wire-format. - Loader example replaced: defer({ critical, deferred }) instead of the old "split data manually between loader and component" pattern. - Reviews component example uses <Await name> + <Streamed> from @real-router/react/ssr (with the equivalent inline use(useDeferred(...)) form alongside). - Server entry shows injectDeferredScripts + getDeferBootstrapScript + serializeRouterState({ excludeContext: ["ssrDataDeferred"] }). - Express integration adds <!--defer-bootstrap--> placeholder splice. - Comparison with RR7 reframed: now parity (Real-Router has defer()), with notes on the open framework-agnostic wire format vs RR7's turbo-stream-internal one + cross-adapter support matrix. ssr-data-plugin.md: - New §11 "defer({ critical, deferred }) — critical + streamed split" covering server pipeline (injectDeferredScripts), wire format details (escapeForScript, bootstrap, XSS hardening), per-adapter consumer table, "When NOT to use defer()" matrix (Solid/Vue/Svelte/Angular framework-native rationales). - Teardown section extended to mention all 4 namespace claims (data / ssrDataMode / ssrDataDeferred / ssrDataDeferredKeys). React-Integration.md: - Entry Points: 3 → 5 (added /ssr and /legacy/ssr) plus react-server condition note for Server Components type-only entry. - Decision matrix expanded. Preact-Integration.md: - "Single Entry Point" → "Two Entry Points (main + /ssr)" with note that <Await> implements use(promise) semantics via thenable-throw + .status/.value/.reason tagging. Solid-Integration.md: - Quick Start gains "Two Entry Points: main + /ssr" with note that useDeferred returns Accessor<Promise<T>> + cross-link to Streaming-SSR Solid Counterpart and ssr-data-plugin §11. Vue-Integration.md: - Same two-entry pattern; useDeferred returns Promise<T> for await inside async setup(); <Await v-slot="{ value }"> scoped slot. Svelte-Integration.md: - Same two-entry pattern; useDeferred returns Promise<T> for {#await}; .svelte components <Await>/<Streamed>. Angular-Integration.md: - Two-entry pattern via ng-packagr secondary entry-point at packages/angular/ssr/. - Asymmetric Angular note: no <Await>/<Streamed>; injectDeferred<T>(key) returns Signal<T | undefined>. Stale main-entry imports for SSR-feature symbols verified absent across all wiki pages (grep clean — 0 matches).

    @greydragon888 greydragon888 committed May 9, 2026
  • docs: cover Vue 3 SSR / streaming / SSG across the SSR guides Adds Vue parity coverage to four pages alongside the existing React-focused content: - Vue-Integration.md — new "Server-Side Rendering" section with server + client entry shapes, links to the three vue/ssr-examples/ packages, and Vue-specific gotchas (per-request createSSRApp, blocking <Suspense>, hydration ordering, SSG dev-mode factory detection) - SSR-Hydration.md — Vue 3 entry-server / entry-client snippets next to the existing React ones; same hydration contract, just different renderer + mount call - Streaming-SSR.md — "Vue Counterpart" comparison table (renderToWebStream, blocking Suspense, no out-of-order placeholders, no selective hydration) with an honest note that true OOO streaming awaits Vapor mode - ssr.md — renames "React Integration" to "Framework Integration" with a new Vue 3 subsection; updates stale react example URLs and adds the three new vue/ssr-examples/ links to the See Also list

    @greydragon888 greydragon888 committed May 3, 2026
  • docs: add Streaming SSR guide (#576) New wiki page documenting React 19 native streaming SSR pattern: renderToReadableStream + <Suspense> + use(promise) with ssr-data-plugin for critical data. No router-specific wrapper — pure delegation to React 19 primitives. Covers mental model (critical vs deferred data), minimal three-file setup, per-render memoized promise + server-only setTimeout constraints, Express integration, comparison with React Router 7 defer()/<Await>, when to use vs when not to, and the 5-scenario reference example. Cross-references: - Data-Loading.md: link to Streaming SSR for non-RSC deferred sections - _Sidebar.md: register page under Concepts

    @greydragon888 greydragon888 committed May 3, 2026