-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Update type check for NavigationCardStack #9808
Update type check for NavigationCardStack #9808
Conversation
let's make them consistent to avoid unnecessary warnings. (e.g. trying to pass a animationStyle into cardStyle)
By analyzing the blame information on this pull request, we identified @hedgerwang and @jmurzy to be potential reviewers. |
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 [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
It seems like
What is animationStyle and why is not a |
@mkonicek the thing is that NavigationCard's render() is using a Animated.View the style property could be as following:
while |
Ah, I see the problem. Can't we use |
@ericvicenti this could work, although after I changed it to Animated.View.propTypes.style it exposed another issue(warning): since there is a property in NavigationPropTypes named "position", and it's conflicted with the ViewStylePropTypes check inside of AnimatedImplementation.js@1485. Although I think this false warning is not critical and it's because the checking itself in AnimatedImplementation is not so precise. |
I have had this issue with one of my modules and I think |
@lgan1989 updated the pull request - view changes |
@lgan1989 updated the pull request - view changes |
@lgan1989 updated the pull request - view changes |
@ericvicenti has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: The typecheck inside of NavigationCard is PropTypes.any while in NavigationCardStack it is View.propTypes.style. let's make them consistent to avoid unnecessary warnings. (e.g. trying to pass a animationStyle as cardStyle) Closes facebook#9808 Differential Revision: D4277323 Pulled By: ericvicenti fbshipit-source-id: c30b4a21675cad98c19f5c6522e286d776bfa20d
Summary: The typecheck inside of NavigationCard is PropTypes.any while in NavigationCardStack it is View.propTypes.style. let's make them consistent to avoid unnecessary warnings. (e.g. trying to pass a animationStyle as cardStyle) Closes #9808 Differential Revision: D4277323 Pulled By: ericvicenti fbshipit-source-id: c30b4a21675cad98c19f5c6522e286d776bfa20d
Summary: The typecheck inside of NavigationCard is PropTypes.any while in NavigationCardStack it is View.propTypes.style. let's make them consistent to avoid unnecessary warnings. (e.g. trying to pass a animationStyle as cardStyle) Closes facebook#9808 Differential Revision: D4277323 Pulled By: ericvicenti fbshipit-source-id: c30b4a21675cad98c19f5c6522e286d776bfa20d
The typecheck inside of NavigationCard is PropTypes.any while in NavigationCardStack it is View.propTypes.style.
let's make them consistent to avoid unnecessary warnings. (e.g. trying to pass a animationStyle as cardStyle)