preact-render-to-string lets you render JSX and Preact components into an HTML string, useful for universal or isomorphic rendering in Node and the browser. It also provides async rendering, plus streaming helpers (Web Streams and Node.js stream variants) for incremental HTML output with Suspense support.
Project status
- Actively maintained, with recent tagged updates as late as 2026-05-17 (latest shown, v6.7.0) and an upstream push on 2026-05-25, indicating ongoing development rather than maintenance mode.
- Apparent update cadence, mostly patch-level, with releases clustering around a roughly 1 to 3 month rhythm in the last year (for example v6.6.4 in 2025-12-12, v6.6.5 in 2025-12-31, v6.6.6 in 2026-02-20, v6.6.7 in 2026-03-28, v6.7.0 in 2026-05-17).
AI summary generated
Recent updates
v6.7.0
v6.7.0 updates the HTML comment markers used by the streaming/chunked “island” mechanism so they match the markers produced by renderToStringAsync (switching to the $s:* format). It also tightens rendering security for SVG/XML namespaced attributes by rejecting unsafe names before any namespace casing/normalization occurs.
BreakingSecurityv6.6.7
v6.6.7 is a patch release focused on an async suspense rendering regression. The documented change fixes commas appearing in the output of renderToStringAsync when suspended components have complex (array-producing) children.
v6.6.6
v6.6.6 is a patch release focused on correcting how streaming chunk output is generated when the rendered content is a full HTML document. The code changes specifically adjust where the deferred streaming wrapper is inserted so browsers accept the resulting HTML.
v6.6.5
v6.6.5 is a patch release that aims to fix Preact useId behavior when rendering JSX to a string. The release notes claim the change ensures useId produces unique IDs when using the JSX renderer, and the tests add coverage for sibling and nested components.
v6.6.4
v6.6.4 is a patch release focused on streaming/chunked rendering behavior when suspensions are thrown multiple times from the same component. The release notes mention only that multi-suspension now works correctly, but the code diff also adjusts how thrown values are classified as suspensions and how onError fallback rendering errors are handled.
v6.6.3
v6.6.3 is a patch release that updates the pretty-printer so `<pre>` and `<textarea>` preserve their internal whitespace when `pretty: true` is used. The diff also updates CI and dependency lock metadata, but those changes are not described in the release notes.
v6.6.2
v6.6.2 is a patch release focused on fixing the JSX pretty renderer. The main change ensures enumerated attributes render their values as strings (for example, boolean values become "true" or "false").
v6.6.1
v6.6.1 is a patch release focused on improving compatibility with pre-release versions of Preact v11. The code diff indicates only package metadata changes, specifically the peerDependency semver range adjustment for Preact.
v6.6.0
v6.6.0 improves render-to-string async behavior around Suspense, adding support for nested and multiple suspended components and marking suspended subtrees in `renderToStringAsync`. It also updates internals for Preact 11 compatibility (component dirty bits), fixes signal prop support, and adjusts `renderToPipeableStream().abort()` behavior when the stream is already closed.
BreakingFeaturesv6.5.13
v6.5.13 is a patch release focused on suspense rendering correctness and stream error handling. It keeps `_parent` around across multiple suspensions to avoid id duplication and circular references, and changes stream error behavior so errors are surfaced via `onError`.
Features