Merge pull request #2972 from spicyj/inline2

Use a helper function for React "inlining"
This commit is contained in:
Sebastian McKenzie
2015-11-11 12:39:54 -08:00
19 changed files with 68 additions and 204 deletions

View File

@@ -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;
};
}
}