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

Function renderToString

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

Source from the content-addressed store, hash-verified

1import { BETH_GLOBAL_RENDER_CACHE } from "../shared/global";
2
3export function renderToString<T extends () => JSX.Element>(
4 lazyHtml: T,
5): JSX.Element {
6 BETH_GLOBAL_RENDER_CACHE.reset();
7 const resultPromise = lazyHtml();
8 return resultPromise;
9}
10
11export async function renderToStringResponse<T extends () => JSX.Element>(
12 lazyHtml: T,

Callers 9

htmlFunction · 0.90
htmlFunction · 0.90
html2Function · 0.90
render.test.tsxFile · 0.90
renderToStringResponseFunction · 0.85

Calls 1

resetMethod · 0.80

Tested by 3

htmlFunction · 0.72
htmlFunction · 0.72
html2Function · 0.72