/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-stream-boolean-reco-96f478f89047-stream-boolean-record-s0239-c0000.md
stream: `boolean` | `Record ` - hono-docs
stream: boolean | Record Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt stream boolean record Su...
stream: boolean | Record
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#stream-boolean-record
Summary
If you set it to true or provide a Record value, it will be rendered as a streaming response. ```tsx const AsyncComponent = async () => { await new Promise((r) => setTimeout(r, 1000)) // sleep 1s return Hi! } app.get( '*', jsxRenderer(...
Content
If you set it to true or provide a Record value, it will be rendered as a streaming response.
const AsyncComponent = async () => {
await new Promise((r) => setTimeout(r, 1000)) // sleep 1s
return <div>Hi!</div>
}
app.get(
'*',
jsxRenderer(
({ children }) => {
return (
<html>
<body>
<h1>SSR Streaming</h1>
{children}
</body>
</html>
)
},
{ stream: true }
)
)
app.get('/', (c) => {
return c.render(
<Suspense fallback={<div>loading...</div>}>
<AsyncComponent />
</Suspense>
)
})If true is set, the following headers are added:
{
'Transfer-Encoding': 'chunked',
'Content-Type': 'text/html; charset=UTF-8',
'Content-Encoding': 'Identity'
}You can customize the header values by specifying the Record values.