zerolith/ssr
Import from zerolith/ssr. Generated from the source; every signature below is what the published types declare.
Functions
escapeText
function escapeText(text: string): stringEscapes text content.
Source: packages/zerolith/src/ssr.ts:20
escapeAttribute
function escapeAttribute(text: string): stringEscapes an attribute value for double quotes.
Source: packages/zerolith/src/ssr.ts:26
renderToString
function renderToString(view: unknown): stringRenders a view to HTML, with the markers hydrate() needs. Effects
created while rendering (inside each rows, when branches, and
computed values) are disposed before it returns. A component called
before renderToString runs outside that scope, exactly as in the
browser, and owns its own effects; given a function that returns the
view, as in renderToString(() => App()), the component runs inside
the scope, so its effects and cleanups end with the render.
Source: packages/zerolith/src/ssr.ts:145
renderStyles
function renderStyles(): stringA <style> element per css literal created so far, for the document head.
Source: packages/zerolith/src/ssr.ts:153