-
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
Feature Flag for React.jsx' "spreading a key to jsx" warning #18074
Feature Flag for React.jsx' "spreading a key to jsx" warning #18074
Conversation
Details of bundled changes.Comparing: 4912ba3...96c85c6 react
react-dom
react-reconciler
scheduler
react-art
React: size: 0.0%, gzip: 0.0% Size changes (experimental) |
f15ee76
to
6c60013
Compare
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. |
Details of bundled changes.Comparing: 4912ba3...96c85c6 react
react-dom
react-art
react-reconciler
scheduler
ReactDOM: size: 0.0%, gzip: 🔺+0.1% React: size: 0.0%, gzip: 0.0% Size changes (stable) |
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. |
@@ -365,13 +369,20 @@ export function jsxWithValidation( | |||
} | |||
} | |||
|
|||
if (hasOwnProperty.call(props, 'key')) { |
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.
moved this inside the __DEV__
block. It wasn't being DCEed, so that gets us a few bytes back too.
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.
Wait, wasn’t this whole file supposed to be dev only? Are you saying this function is used in prod?
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.
Oh hmm you're right. I only glanced at sizebot, probably not relevant.
0643ad6
to
513ed10
Compare
513ed10
to
78f69d0
Compare
Adds a feature flag for when React.jsx warns you about spreading a key into jsx. It's false for all builds, except as a dynamic flag for fb/www. I also included the component name in the warning.
43bd414
to
96c85c6
Compare
Adds a feature flag for when
React.jsx
warns you about spreading a key into jsx. It's false for all builds, except as a dynamic flag for fb/www.I also included the component name in the warning.