Reference
@reckona/mreact-server/html-helpers
12 public exports.
Function
FunctioncreateEventHydrationManifest
function createEventHydrationManifest(events: readonly EventHydrationEntry[]): EventHydrationManifestCreates a defensive copy of an event hydration manifest.Functionhtmlfunction html(node: unknown, options: HtmlResponseOptions): ResponseCreates an HTML Response from a React-compatible node.FunctionrenderEventHydrationManifestfunction renderEventHydrationManifest(sink: HtmlSink, manifest: EventHydrationManifest, options: HydrationScriptOptions): voidAppends an event hydration manifest as a JSON script tag.FunctionrenderReactNodeToStringfunction renderReactNodeToString(node: unknown): Promise<string>Renders a React-compatible node to an HTML string.FunctionrenderScriptAssetfunction renderScriptAsset(sink: HtmlSink, options: ScriptAssetOptions): voidAppends an external script tag with optional nonce and integrity attributes.FunctionrenderSsrStatefunction renderSsrState(sink: HtmlSink, value: unknown, options: HydrationScriptOptions): voidAppends serialized SSR state as a JSON script tag.FunctionrenderToStringfunction renderToString(render: StreamRender): Promise<string>Renders sink output to a string after awaiting deferred work.FunctionserializeSsrStatefunction serializeSsrState(value: unknown): stringSerializes state for safe embedding in an HTML script tag.Interface
InterfaceEventHydrationEntry
interface EventHydrationEntryEvent handler entry used by the hydration manifest.InterfaceEventHydrationManifestinterface EventHydrationManifestManifest of event handlers that can be hydrated on the client.InterfaceHtmlResponseOptionsinterface HtmlResponseOptionsResponse options used when wrapping rendered HTML in a Response.InterfaceScriptAssetOptionsinterface ScriptAssetOptionsExternal script asset attributes emitted by renderScriptAsset.