Uh oh!
There was an error while loading. Please reload this page.
fix exception when ES6 class with no propTypes defined before calling requireNativeComponent - #1260
fix exception when ES6 class with no propTypes defined before calling requireNativeComponent#1260kejinlu wants to merge 4 commits into
Conversation
… requireNativeComponent
facebook-github-bot
commented
May 13, 2015
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
facebook-github-bot
commented
May 13, 2015
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
ide
commented
May 13, 2015
I have a question - what kind of native view does not have custom props? All the native views so far have special props to customize them. |
There was a problem hiding this comment.
Please use === or !== instead of their looser counterparts whenever possible.
There was a problem hiding this comment.
Or just check truthiness without comparing to undefined.
vjeux
commented
May 14, 2015
Can you provide more context in how you experienced this error? |
kejinlu
commented
May 14, 2015
React Native "Native UI Components (iOS)" Guide call requireNativeComponent before propTypes ,Then will experience this error |
ide
commented
May 14, 2015
I think there's a bug in that code, since |
sahrens
commented
May 14, 2015
@ide is right - maybe change this PR to throw a more useful error? |
kejinlu
commented
May 14, 2015
Should I close the request? |
ide
commented
May 14, 2015
@kejinlu can you update this PR so that it asserts? |
kejinlu
commented
May 14, 2015
sahrens
commented
May 15, 2015
Looks like for ES6 classes @spicyj : any idea why this is inconsistent? Is there a better mechanism than just checking both like ' |
sahrens
commented
May 15, 2015
import |
sahrens
commented
May 15, 2015
Can you figure out the right way to include the component name in the error messages and make it consistent in the function? |
sahrens
commented
May 15, 2015
@facebook-github-bot import |
facebook-github-bot
commented
May 15, 2015
Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/966263836738882/int_phab to review. |
sophiebits
commented
May 15, 2015
displayName || name is the right way to do it. |
ES6 classes name works, but for React.createClass displayName works.
Bring over some component governance improvements to 0.68-stable
No description provided.