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

30 lines
457 B
JavaScript

function thisExpr() {
return <p>{this.Foo}</p>;
}
function thisJSX() {
return <this.Foo />;
}
class A extends B {
superExpr() {
return <p>{super.Foo}</p>;
}
superJSX() {
return <super.Foo />;
}
}
function argumentsExpr() {
return <p>{arguments.Foo}</p>;
}
function argumentsJSX() {
return <arguments.Foo />;
}
function newTargetExpr() {
return <p>{new.target.Foo}</p>;
}
function newTargetJSX() {
return <new.target.Foo />;
}