And using the new jsx transform, babel compiles it down to (link)
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
const App = () => /*#__PURE__*/_jsx(_Fragment, {
children: "hello"
});
While reason-react still uses React.createElement (playground)
// Generated by Melange
import * as React from "react";
import * as JsxRuntime from "react/jsx-runtime";
function _none_(Props) {
return React.createElement(JsxRuntime.Fragment, undefined, "hello");
}
const make = _none_;
export {
make ,
}
/* react Not a pure module */
Given the following code
And using the new
jsx
transform, babel compiles it down to (link)While
reason-react
still usesReact.createElement
(playground)