add optimisation.react.constantElements transformer - facebook/react#3228
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
function render() {
|
||||
return <foo />;
|
||||
}
|
||||
|
||||
function render() {
|
||||
var text = getText();
|
||||
return function () {
|
||||
return <foo>{text}</foo>;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
|
||||
var _ref = {
|
||||
type: "foo",
|
||||
ref: null,
|
||||
props: {},
|
||||
key: null
|
||||
};
|
||||
function render() {
|
||||
return _ref;
|
||||
}
|
||||
|
||||
function render() {
|
||||
var text = getText();
|
||||
var _ref = {
|
||||
type: "foo",
|
||||
ref: null,
|
||||
children: [text],
|
||||
props: {},
|
||||
key: null
|
||||
};
|
||||
return function () {
|
||||
return _ref;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"optional": ["optimisation.react.constantElements", "optimisation.react.inlineElements"]
|
||||
}
|
||||
Reference in New Issue
Block a user