JSX
JSX compiles through the automatic runtime (jsx / jsxs / jsxDEV / Fragment). Those functions build vnodes directly; they do not call h(). h() remains the public hyperscript helper.
Supported:
classandclassNamehtmlFor/for- DOM events:
onClick,onDoubleClick(nativedblclick),onInput,onKeyDown, … - Any
on*prop is treated as an event.onFooBarlistens for"foobar". String values are never written as inline HTML handlers. - 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.