-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[react] Use React 15.5 and prop-types lib #6577
Conversation
I think this might be blocked until Enzyme releases an update. Relevant PR is here, but it hasn't yet been released. |
Thanks for taking this on. 👍 |
As any responsible developers, we treat warning as error in our test suite thanks to |
@oliviertassinari I commented out the relevant bits and slapped a comment in there. Let me know if there's anything else I can do to prep this PR. Note also that we'll still be seeing deprecation warnings in docs until this or this PR merges for |
@rsolomon Sorry about the merge conflict. Thanks for the quick turnround! |
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.
@rsolomon Thanks for updating the PR. Some last comments.
docs/src/app/app.native.js
Outdated
@@ -1,4 +1,6 @@ | |||
import React, {Component, PropTypes} from 'react-native'; | |||
import React, {Component} from 'react-native'; | |||
|
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.
Minor issue, we have quite some blank lines added by this PR between the imports.
package.json
Outdated
"react-dom": "^15.4.0", | ||
"react": "^15.5.0", | ||
"react-dom": "^15.5.0", | ||
"react-prop-types": "^15.5.0", |
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.
I think that it should be a dependency. No need to worry about conflicts.
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.
For instance: reduxjs/react-redux#663.
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.
- It should be a dependency.
- The package is called
prop-types
, notreact-prop-types
.
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.
😰 Yikes, thanks for catching.
package.json
Outdated
"react-dom": "^15.4.0", | ||
"react": "^15.5.0", | ||
"react-dom": "^15.5.0", | ||
"react-prop-types": "^15.5.0", |
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.
- It should be a dependency.
- The package is called
prop-types
, notreact-prop-types
.
package.json
Outdated
@@ -52,6 +51,7 @@ | |||
"keycode": "^2.1.8", | |||
"lodash.merge": "^4.6.0", | |||
"lodash.throttle": "^4.1.1", | |||
"prop-types": "^15.5.0", |
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.
Please use ^15.5.7
. There are critical known issues in earlier versions.
@oliviertassinari the whitespace and dependency issues should be good to go. Let me know if there's anything I can do to help |
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.
That looks almost good to me 👍 .
Also noticed that you left the docs/package.json
untouched. We can do that in another PR.
package.json
Outdated
"react": "^15.4.0", | ||
"react-dom": "^15.4.0", | ||
"react": "^15.5.0", | ||
"react-dom": "^15.5.0", |
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.
Can we stick to the older versions? I don't think that we need to upgrade the requirement. We would have to release a minor instead of a patch otherwise.
"react": "^15.4.0",
"react-dom": "^15.4.0",
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.
Ah you're right for the peerDependencies
. I do think you'll want to keep the dependencies
(though I think in this case they should be devDependencies
, but I don't have any historical context here) to 15.5.0
for react-dom
because this diff uses react-dom/test-utils
, which was a recent migration.
Just want to confirm with you before I make the change.
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.
You are referring to the following dependencies
:
+ "react-addons-create-fragment": "^15.5.0",
+ "react-addons-transition-group": "^15.5.0",
Same, I don't think that we need to update those. If we do, let's release a minor
.
@oliviertassinari Some quick notes on the last update:
I'm not completely comfortable setting the
|
@rsolomon Option 3 sounds fine to me. The more version of React we support, the better. We can always change the strategy if that introduce issues. |
Use new
prop-types
lib instead of the deprecatedReact.PropTypes
.Fixes #6542
Note that the
react-title-component
lib references indocs
still usesReact.PropTypes
, so you'll still get the error there.