-
Notifications
You must be signed in to change notification settings - Fork 2.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
Do not mix production and development version of create-react-class #1012
Conversation
Changes Unknown when pulling e350009 on am-fix-defaultprops-warnings into ** on master**. |
@amanmahajan7 what impact does this have on bundle size? 😳 |
@jpdriver, it does not change the bundle size by much, previously |
+1 for this, getting all the warnings is pretty annoying |
Any reason why this can't be merged? |
Description
Fix false positive
getDefaultProps
warnings. Fixed #978Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x")
What is the current behavior? (You can also link to an open issue here)
React 15.5
deprecatedReact.createClass
and added a warning whengetDefaultProps()
method is used with class components (React.component
). These deprecation warnings are only shown in development mode. Components created usingReact.createClass
orcreateReactClass
still usegetDefaultProps()
method to definedefaultProps
. In development mode,React
sets a flagisReactClassApproved
to suppress these warnings for components created usingReact.createClass
orcreateReactClass
.react-data-grid.js
bundles themin
version ofcreate-react-class
(created using webpack) and because of thisisReactClassApproved
flag is not set anymore on the components created using usingReact.createClass
orcreateReactClass
.What is the new behavior?
react-data-grid.js
bundles thedev
version ofcreate-react-class
react-data-grid.min.js
bundles themin
version ofcreate-react-class
Does this PR introduce a breaking change? (check one with "x")
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information:
This is a temporary fix, in the future when mixins are removed, remaining components can be converted to class components and
create-react-class
package can be dropped