Document default layout renderer alternatives - #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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Coverage Report for CI Build 28295970688Coverage increased (+0.4%) to 92.317%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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
9308a93 to
ac75399Compare9d7d68a to
2f5877fComparebdec614 to
29118f5Compare29118f5 to
2183098CompareUh oh!
There was an error while loading. Please reload this page.
Closes#239
This PR documents how to swap DomStack's
fragtmldefault layout renderer for the previous HTM/Preact approach usinghtm/preactandpreact-render-to-string.It also presents
async-htm-to-stringas a more direct and potentially more performant alternative for server-only layout templates that mostly combine strings and already-rendered page HTML.The README now covers:
@preact/compat, with a link to https://bret.io/blog/2026/simple-tanstack-query-in-preact/ for more detail.htm/preactandpreact-render-to-string.async-htm-to-string.async-htm-to-stringgotchas around standard HTML attributes, awaitinghtml, andrawHtml()safety.