by postdb · 3y ago · 0 comments
Then again, if we are at this road now again, maybe they should just bring a lighter version of e4x as part of ES/JS.
So in Sciter this works out of the box:
<html>
<body/>
<script>
function HelloWorld() {
return <p>Hello <b>world</b></p>;
}
document.body.append(<HelloWorld/>);
</script>
</html>
JSX expressions are compiled to calls of JSX(tag,atts,kids) function. That function can be redefined enabling
different libraries to use JSX in the way they want, here is an example of using JSX with PReact: import { h, render, Component } from 'preact';
JSX = h; // let's use PReact::h() as a driver of JSX expressions
See https://gitlab.com/sciter-engine/sciter-js-sdk/-/blob/main/s...