Vanilla jsx without runtime.
HTML Tag return DOM in js, No virtual DOM.
const content = <div>This is content.</div>;
document.body.append(content);
npm i @vanilla-jsx/jsx-runtime
and edit babel.config.js
or .babelrc
or other babel config:
...
presets: [
...
[
'@babel/preset-react', {
runtime: 'automatic',
importSource: '@vanilla-jsx'
}
]
]
...
then, coding js with jsx.
- Getting started
- Advanced