A tiny in 500 bytes library to JSX syntax templates for DOM. Support HTML, SVG and MathML tags.
npm i jsx-dom-runtime
# or
yarn add jsx-dom-runtime
Add preset to your .babelrc
file.
.babelrc
{
"presets": [
"jsx-dom-runtime/babel-preset"
]
}
// add to the end of the head
document.head.append(
<link rel="stylesheet" href="/style.css" />
);
// add to the end the the body
document.body.append(
<main class="box">
<h1 class="title">Hello World!</h1>
</main>
);