Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions packages/react/src/jsx/ReactJSX.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,21 @@
*/
import {REACT_FRAGMENT_TYPE} from 'shared/ReactSymbols';
import {
jsxWithValidationStatic,
jsxWithValidationDynamic,
jsxWithValidation,
} from './ReactJSXElementValidator';
import {jsx as jsxProd} from './ReactJSXElement';
const jsx: any = __DEV__ ? jsxWithValidationDynamic : jsxProd;
jsxProd,
jsxProdSignatureRunningInDevWithDynamicChildren,
jsxProdSignatureRunningInDevWithStaticChildren,
jsxDEV as _jsxDEV,
} from './ReactJSXElement';

const jsx: any = __DEV__
? jsxProdSignatureRunningInDevWithDynamicChildren
: jsxProd;
// we may want to special case jsxs internally to take advantage of static children.
// for now we can ship identical prod functions
const jsxs: any = __DEV__ ? jsxWithValidationStatic : jsxProd;
const jsxDEV: any = __DEV__ ? jsxWithValidation : undefined;
const jsxs: any = __DEV__
? jsxProdSignatureRunningInDevWithStaticChildren
: jsxProd;

const jsxDEV: any = __DEV__ ? _jsxDEV : undefined;

export {REACT_FRAGMENT_TYPE as Fragment, jsx, jsxs, jsxDEV};
Loading