JSX
JSX compiles to h() via the automatic runtime (jsx / jsxs / Fragment).
Supported:
classandclassNamehtmlFor/foronClick,onDoubleClick,onInput,onKeyDown, …- boolean attributes (
disabled,checked) styleas a string or objectrefas a callback, called with the element on mount andnullon unmountdangerouslySetInnerHTML={{ __html }}for trusted markup- Fragments (
<>…</>) keyon list children
Dynamic lists of components should have keys. In development SvenJS warns about mixed or duplicate keys.
You can skip JSX and call h("div", { className: "box" }, "hi") directly.