[react] Use React 15.5 and prop-types lib#6577
[react] Use React 15.5 and prop-types lib#6577mbrookes merged 10 commits intomui:masterfrom rsolomon:proptypes
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! |
oliviertassinari
left a comment
There was a problem hiding this comment.
@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.
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.
I think that it should be a dependency. No need to worry about conflicts.
There was a problem hiding this comment.
- It should be a dependency.
- The package is called
prop-types, notreact-prop-types.
There was a problem hiding this comment.
😰 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.
- It should be a dependency.
- The package is called
prop-types, notreact-prop-types.
package.json
Outdated
| "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.
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 |
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.
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.
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.
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-typeslib instead of the deprecatedReact.PropTypes.Fixes #6542
Note that the
react-title-componentlib references indocsstill usesReact.PropTypes, so you'll still get the error there.