jsx.js (1115B)
1 var REACT_ELEMENT_TYPE; 2 3 function _createRawReactElement(type, props, key, children) { 4 REACT_ELEMENT_TYPE || (REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol["for"] && Symbol["for"]("react.element") || 60103); 5 var defaultProps = type && type.defaultProps, 6 childrenLength = arguments.length - 3; 7 if (props || 0 === childrenLength || (props = { 8 children: void 0 9 }), 1 === childrenLength) props.children = children;else if (childrenLength > 1) { 10 for (var childArray = new Array(childrenLength), i = 0; i < childrenLength; i++) { 11 childArray[i] = arguments[i + 3]; 12 } 13 14 props.children = childArray; 15 } 16 if (props && defaultProps) for (var propName in defaultProps) { 17 void 0 === props[propName] && (props[propName] = defaultProps[propName]); 18 } else props || (props = defaultProps || {}); 19 return { 20 $$typeof: REACT_ELEMENT_TYPE, 21 type: type, 22 key: void 0 === key ? null : "" + key, 23 ref: null, 24 props: props, 25 _owner: null 26 }; 27 } 28 29 module.exports = _createRawReactElement, module.exports.__esModule = true, module.exports["default"] = module.exports;