Repository navigation
add experimentalIncrementalRender mode for stable/tail split rendering
What
Add experimentalIncrementalRender prop that splits rendered content into a stable part (rendered once) and a tail part (updated as characters are typed), reducing full markdown re-parses on every keystroke.
Changes
experimentalIncrementalRenderprop — opt-in incremental renderingincrementalFlushThresholdprop — controls tail buffer flush size (default 1200)setContent()ref method — replace content instantly without typing animation- Block-boundary tracking (
IncrementalContext) for fenced code, math, tables, blockquotes, setext headings — flushes tail only at safe boundaries - LCP optimization: when content diverges mid-string, reuses the common prefix and only types the diff
Notes
- Off by default, no breaking changes
experimentalprefix signals API may change in future releases
What
添加 experimentalIncrementalRender 属性,将渲染内容拆分为稳定部分(只渲染一次)和尾部(随字符打出持续更新),减少每次打字时对 Markdown 的全量重新解析。
Changes
experimentalIncrementalRender属性 —— 按需开启增量渲染incrementalFlushThreshold属性 —— 控制尾部缓冲区的刷新大小(默认 1200)setContent()ref 方法 —— 不经过打字动画,直接替换当前内容- 块边界追踪(
IncrementalContext)—— 覆盖围栏代码块、数学公式、表格、引用块、setext 标题,仅在安全边界处刷新尾部 - LCP 优化:当内容在字符串中途发生分歧时,复用公共前缀,仅对差异部分进行打字
Notes
- 默认关闭,无破坏性变更
experimental前缀表明该 API 在后续版本中可能发生变化