MCPcopy Create free account
hub / github.com/ethanniser/the-beth-stack / renderToStreamResponse

Function renderToStreamResponse

packages/beth-stack/src/jsx/render.ts:22–31  ·  view source on GitHub ↗
(
  lazyHtml: T,
)

Source from the content-addressed store, hash-verified

20}
21
22export function renderToStreamResponse<T extends () => JSX.Element>(
23 lazyHtml: T,
24): Response {
25 const stream = renderToStream(lazyHtml);
26 return new Response(stream, {
27 headers: {
28 "Content-Type": "text/html; charset=utf-8",
29 },
30 });
31}
32
33export function renderToStream<T extends () => JSX.Element>(
34 lazyHtml: T,

Callers 2

htmlStreamFunction · 0.90
render.test.tsxFile · 0.90

Calls 1

renderToStreamFunction · 0.85

Tested by

no test coverage detected