1import { Suspense } from "react";
2
3export const dynamic = "force-dynamic";
4
5async function Slow() {
6 // Long enough that the shell flushes first, short enough to keep the
7 // suite fast.
8 await new Promise((resolve) => setTimeout(resolve, 700));
9 return <p>STREAMING_RESOLVED_MARKER</p>;
10}
11
12// Streaming SSR: the initial HTML shell carries the Suspense fallback and
13// the resolved content arrives later in the same (chunked) response.
14export default function Streaming() {
15 return (
16 <main>
17 <h1>STREAMING_PAGE_MARKER</h1>
18 <Suspense fallback={<p>STREAMING_SUSPENSE_MARKER</p>}>
19 <Slow />
20 </Suspense>
21 </main>
22 );
23}