RenderToStreamOptions
Summary
Options for server-side rendering to a byte stream.
Signature
interface RenderToStreamOptions {
frameSrc?: string | URL
nonce?: string
onError?: (error: unknown) => void
resolveClientEntry?: (
entryId: string,
component: (handle: Handle<{}, NoContext>) => RenderFn & EntryMetadata,
) => ResolvedClientEntry | Promise<ResolvedClientEntry>
resolveFrame?: (
src: string,
target?: string,
context?: ResolveFrameContext,
) =>
| string
| ReadableStream<Uint8Array<ArrayBufferLike>>
| Promise<string | ReadableStream<Uint8Array<ArrayBufferLike>>>
signal?: AbortSignal
topFrameSrc?: string | URL
}
Properties
frameSrc
Source URL to associate with the current frame render.
nonce
Content Security Policy nonce for generated import maps, module preloads, and CSS mixin styles.
onError
Error hook invoked when rendering work throws.
resolveClientEntry
Callback used to resolve runtime module metadata for client entry modules during SSR.
resolveFrame
Callback used to resolve nested frame content during streaming SSR.
signal
Signal that cancels pending server rendering work.
topFrameSrc
Source URL for the top-level frame in nested frame renders.