Simple stream π
Suspend Astro components with fallback content. Like React Server Components, but Just HTML β’οΈ
Installation
Simple stream is an Astro integration. You can install and configure this via the Astro CLI using astro add
:
Usage
Simple stream exposes a βSuspenseβ utility to show fallback content while your server-side components load.
Suspense
<Suspense>
is a wrapper component for any content you want to load out-of-order with a fallback. Pass any suspended content as children, and use slot="fallback"
to define your fallback:
β οΈ Client JS is required for suspended content to render. For progressive enhancement, we recommend including <noscript>
content as part of your fallback: