@cocoframe/jsx
v0.0.3
Published
Typed escaped TSX runtime and streaming renderer for CocoFrame.
Maintainers
Readme
@cocoframe/jsx
Typed CocoFrame component nodes, escaping, and ordered asynchronous HTML rendering.
jsx,jsxs, andFragmentimplement the TSX runtime.renderToChunksstreams ordered HTML;renderToStringexplicitly buffers it.escapeTextandescapeAttributeprotect dynamic values.rawis the explicit trusted-HTML escape hatch.deferdescribes a supplementary streaming boundary.
const Greeting = ({ name }: { name: string }) => <h1>Hello {name}</h1>;
const html = await renderToString(<Greeting name="CocoFrame" />);Dynamic content is escaped by default and rendering performs one traversal.
Do not introduce an implicit raw-HTML path or buffer streaming APIs. Verify with
tests/jsx.test.ts and core streaming tests.
