[0.45.2] Commits to cherry-pick and use prop-types with React 16 instead
See original GitHub issuereact@16
(a peerDependency
) did away with the PropTypes
export in favor of the prop-types
module.
The issue has been fixed in master. @mojodna has indicated interest in getting this cherry-picked into the 0.45 release. Several issues have been opened that seem to be related to this, enough that I think it’s worth cherry picking into 0.45.2.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:17 (13 by maintainers)
Top Results From Across the Web
Allow different types of PropTypes for one prop - Stack Overflow
I have a component that receives a prop for its size. The prop can be either a string or a number ex: "LARGE"...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll be releasing new version later today / tomorrow morning with those fixes cherry-picked.
@hramos - believe it or not, I have been using the release candidates! But as mentioned before, these issues only randomly started popping up when I tried updating to RN 0.45.1. I’m really not sure what’s going on, and why these errors are only triggered in certain situations.
Regarding the
React.createClass
issue, it’s worth understanding just how many components in React Native are defined this way. This is just the portion in the Libraries/Components folder: https://gist.github.com/Ashoat/b68064b091d6389080acdec6ee1e7bd7I doubt anybody’s going to be able to put up a pull request fixing those within 24 hours, which means people will ostensibly continue seeing this error in 0.45.2. The big question in my mind is: why isn’t everybody seeing these errors? Based on the claim in the error, it would seem that nobody should be able to use React Native 0.45 with React 16, but for some reason this issue does not occur in certain situations. For instance, my dev environment has been in a working state ever since I reinstalled react@16.0.0-alpha.12.