html_of_jsx is a JSX transformation to write HTML declaratively in OCaml, Reason and mlx.
This library was extracted from server-reason-react and later simplified to work only with HTML5.
opam install html_of_jsx
(libraries html_of_jsx)
(preprocess (pps html_of_jsx.ppx))
The only module exposed is JSX
with some functions to construct elements and JSX.render
to transform those elements into a string.
htmx
page)className
, no htmlFor
, no onChange
, etc...), just plain HTML5JSX.render
to render a JSX element to a HTML stringJSX.*
to construct DOM Elements and DOM nodes (JSX.string
, JSX.int
, JSX.null
, JSX.list
and JSX.unsafe
)See the features
page for all details