Render a schema as a web ReadableStream<string> so it can be piped into a Response body. Pulls chunks lazily from the synchronous chunk iterator under the hood.
ReadableStream<string>
Response
import { renderToHtmlReadable } from "schema-components/html/renderToHtmlStream";return new Response(renderToHtmlReadable(userSchema, { value: user }), { headers: { "content-type": "text/html" },}); Copy
import { renderToHtmlReadable } from "schema-components/html/renderToHtmlStream";return new Response(renderToHtmlReadable(userSchema, { value: user }), { headers: { "content-type": "text/html" },});
Render a schema as a web
ReadableStream<string>so it can be piped into aResponsebody. Pulls chunks lazily from the synchronous chunk iterator under the hood.