Lazily initialize and cache constant JSX elements (#12967)
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
var _Foo;
|
||||
|
||||
var Foo = require("Foo");
|
||||
|
||||
var _ref = <Foo />;
|
||||
|
||||
function render() {
|
||||
return _ref;
|
||||
return _Foo || (_Foo = <Foo />);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user