JSX implementation
JSX itself is a pretty standard React-like implementation. It does have a few quirks:
- you need to use
class
instead ofclassName
(this will be aliased in the future) onChange
event works according to the spec (ref), and it won’t be fired after every input update. So you probably want to useonInput
for now (it will also be aliased in the future)
JSX setup
To setup it up, you need to use “automatic” JSX runtime (the new version, the “classic” is not supported). For example, in Babel you need to specify:
[
"@babel/preset-react",
{
runtime: "automatic", // defaults to classic
importSource: "veles", // defaults to react
},
];