Nicolò Ribaudo 8dacf85859
Lazily initialize and cache constant JSX elements (#12967)
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
2021-03-06 17:33:43 +01:00

18 lines
274 B
JavaScript

function render(text) {
var _foo;
return function () {
return _foo || (_foo = <foo>{text}</foo>);
};
}
var Foo2 = require("Foo");
function createComponent(text) {
var _Foo;
return function render() {
return _Foo || (_Foo = <Foo2>{text}</Foo2>);
};
}