Document async-htm-to-string as a Preact-free rendering option#247
Document async-htm-to-string as a Preact-free rendering option#247
Conversation
There was a problem hiding this comment.
Pull request overview
Adds documentation for using async-htm-to-string as a Preact-free option for server-side HTML rendering in DomStack, addressing #239.
Changes:
- Documented
async-htm-to-stringas a string-rendering alternative tohtm/preact+preact-render-to-string - Included examples and highlighted key behavioral differences and gotchas (attribute naming,
awaitusage,rawHtml()XSS risk)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…n, rawHtml nuance - Add npm install snippet to make the section actionable - Clarify the await behavior: the tag returns an object that resolves asynchronously; describe the actual failure mode rather than just saying 'thenable' - Soften the 'trusted' claim for children: note that children can be any type from a page function and may contain unsanitized content depending on the page source
Coverage Report for CI Build 24619423904Coverage remained the same at 91.469%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…wait and { pages })
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Closes #239
DomStack works with
async-htm-to-stringout of the box but there is no documentation pointing users to it. Sites that only do server-side rendering and have no client-side Preact components gain nothing from the Preact dependency andasync-htm-to-stringis a natural fit, using the samehtmtagged template syntax.This adds a "Using async-htm-to-string for string-based rendering" subsection at the end of the TypeScript Support section covering:
htm/preact(attribute names, no separaterenderToStringcall)awaitthehtmltag, and the XSS risk ofrawHtml()rawHtml()for trusted inner content