Merge pull request #2972 from spicyj/inline2
Use a helper function for React "inlining"
This commit is contained in:
@@ -1,30 +1,19 @@
|
||||
var _typeofReactElement = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7;
|
||||
var _createRawReactElement = (function () { var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; return function createRawReactElement(type, key, props) { return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key, ref: null, props: props, _owner: null }; }; })();
|
||||
|
||||
var _ref = _createRawReactElement("foo", null, {});
|
||||
|
||||
var _ref = {
|
||||
$$typeof: _typeofReactElement,
|
||||
type: "foo",
|
||||
key: null,
|
||||
ref: null,
|
||||
props: {},
|
||||
_owner: null
|
||||
};
|
||||
function render() {
|
||||
return _ref;
|
||||
}
|
||||
|
||||
function render() {
|
||||
var text = getText();
|
||||
var _ref2 = {
|
||||
$$typeof: _typeofReactElement,
|
||||
type: "foo",
|
||||
key: null,
|
||||
ref: null,
|
||||
props: {
|
||||
children: text
|
||||
},
|
||||
_owner: null
|
||||
};
|
||||
|
||||
var _ref2 = _createRawReactElement("foo", null, {
|
||||
children: text
|
||||
});
|
||||
|
||||
return function () {
|
||||
return _ref2;
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user