Slide 16
Slide 16 text
2. createElement
がpublic api
である
疑問点: the new JSX runtime, jsx, is not a public API
react/jsx-runtime
からimport
して使えるやーーん
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
const Foo = () => {
return _jsxs(
"div",
{
children: [
_jsx("p", { id: "a", children: "I am foo" }, void 0),
_jsx("p", { children: "I am foo2" }, "b"),
],
},
void 0,
);
};
16