question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[0.45.2] Commits to cherry-pick and use prop-types with React 16 instead

See original GitHub issue

react@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:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:17 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
grabboucommented, Jul 6, 2017

I’ll be releasing new version later today / tomorrow morning with those fixes cherry-picked.

2reactions
Ashoatcommented, Jun 25, 2017

@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/b68064b091d6389080acdec6ee1e7bd7

I 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found