Dynamic HTML chunks
HtmlPartChunkinterface
A chunk representing a dynamic part (interpolation).
HTML chunk assembly
HtmlChunksBuilderclass
Advanced mutable builder used by the published template-to-chunk compiler.
HTML chunk protocol
HtmlChunktype-alias
Represents a piece of a pre-compiled HTML template.
Chunks allow the renderer to stream static parts of the HTML immediately while waiting for dynamic parts to be resolved.
HTML compilation
templateToHtmlChunksfunction
Converts a parsed
Templateinto a sequence ofHtmlChunks. This optimization pre-calculates the static HTML strings to minimize work at render time.
Hydration markers
addTemplateHashfunction
Wraps the HTML chunks with comments containing the template hash. This is crucial for hydration to identify which template rendered a section of HTML.
Sparse HTML chunks
HtmlSparsePartChunkinterface
A chunk representing a sparse part (mixed static/dynamic text).
Spread serialization
isSerializableSpreadKeyfunction
Reports whether a dynamic spread key may be serialized into SSR HTML.
Static HTML chunks
HtmlTextChunkinterface
A static text chunk.