React
Streaming and Suspense in the App Router
Streaming sends the shell while the server works. Where the Suspense boundary goes, what it costs and when it is useless: structure, code and limits.
Key points
- One `
` boundary around the slow widget is enough: the shell leaves at once. - `loading.tsx` wraps the whole segment and loses per-panel granularity.
- The skeleton must match the height of the final content, or it causes CLS.
- A static page is prerendered: it does not stream and the boundary buys nothing.
Streaming sends HTML to the browser while the server is still working: the shell appears at once and the slow data follows. In the App Router a single `
What actually happens
React renders the tree on the server and sends the first chunk with the shell: header, title, skeleton. When a promise resolves, the fragment arrives as an inline `