package html_of_jsx
Render HTML with JSX
Install
dune-project
Dependency
Authors
Maintainers
Sources
html_of_jsx-0.0.5.tbz
sha256=53406f788909fdab597fe4b627a87b61543417e0bc1133a000629e12be444062
sha512=e2be5fa788c450b6ccbfef9390625b6abc26616b03fa111e3549f4d28a6410f2f8f27c63c91f6f93d5c1b00908480ed286d0bfe28c2c9d58d0cf829a8df66163
doc/react.html
Enable React attributes
(Experimental)
Support React properties as attributes in all HTML and SVG elements.
React properties
React properties are renamed to match the React DOM API. The rendered HTML won't have any reactisms. For example, `className` is renamed to `class`, `htmlFor` is renamed to `for`, etc.
Those react properties are additional, HTML and SVG attributes are still correct. For example, `class` is still valid, and `className` is also valid.
Why
This mode is a way help to migrate away from (or migrate to) React
Enable
Adding the -react
flag into the ppx
(libraries html_of_jsx)
(preprocess (pps html_of_jsx.ppx -react))
Example
JSX.render(<div className="random" />);
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page