-
Notifications
You must be signed in to change notification settings - Fork 47.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Put React.jsx and React.jsxDEV behind experimental build #18023
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 79d4c58:
|
Details of bundled changes.Comparing: 8cb2fb2...79d4c58 react
React: size: 🔺+3.7%, gzip: 🔺+2.7% Size changes (experimental) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approving pending CI passing
packages/react/src/React.js
Outdated
} | ||
if (__DEV__) { | ||
React.jsxDEV = jsxWithValidation; | ||
React.jsx = jsxWithValidationDynamic; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you consider moving .jsx
and .jsxs
up to Line 106?
jsx: __DEV__ ? jsxWithValidationDynamic : jsx,
jsxs: __DEV__ ? jsxWithValidationStatic : jsx,
and leave React.jsxDEV = jsxWithValidation;
as it is here in this __DEV__
check
Just for consistency with createElement.
This warning is enabled in jsx: react/packages/react/src/ReactElementValidator.js Lines 371 to 373 in f2fd484
This means that upgrading to future Babel plugins would enable this warning. Should we wait to enable this until later so it becomes part of a React upgrade instead of a Babel upgrade? Edit: It's our top firing warning internally. That said, it's not that many unique callsites. Edit 2: We need to at least dedupe this one. It's firing so much because it's not deduped. |
The 'Spreading a key to JSX' warning is now behind a feature flag (#18074). Could we rebase and land this? |
Put React.jsx and React.jsxDEV behind experimental build (facebook#18023)
This PR puts the
React.jsx
andReact.jsxDEV
(enableJSXTransformAPI
feature flag) in the experimental build so that we can use it to test React Native.