-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Moved requireNativeComponent to a new file #23084
Moved requireNativeComponent to a new file #23084
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code analysis results:
eslint
found some issues.
Libraries/Components/ProgressBarAndroid/AndroidProgressBarNativeComponent.js
Show resolved
Hide resolved
Libraries/Components/ProgressBarAndroid/AndroidProgressBarNativeComponent.js
Outdated
Show resolved
Hide resolved
Libraries/Components/ProgressBarAndroid/AndroidProgressBarNativeComponent.js
Show resolved
Hide resolved
Thanks for the PR! Yeah, it would be great if you could duplicate the type and put it in the new file, typing the requireNativeComponent call. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code analysis results:
eslint
found some issues.
Libraries/Components/ProgressBarAndroid/AndroidProgressBarNativeComponent.js
Outdated
Show resolved
Hide resolved
@TheSavior I've added the flow type for the native component. All of the yarn tests(flow, lint, test), still pass locally. Would there be anything else I would need to do for this PR? I've tried testing my changes in the RNTester App, but the app crashes when I try to run it on an emulator. I don't seem to get any sort of error message either. |
Thanks for updating it. You should be able to get the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpojer has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Thank you for your PR. It turns out that this was already implemented in #23068 before you submitted a PR. I'm sorry that this caused you to do extra work :( |
hey @cpojer it's ok. It wasa good exposure to react native and flow. |
Changelog:
[Android] [Changed] - I did some work for issue #22990. All the imports connected to requireNativeComponent in ProgressBarAndroid were moved to a separate file.
Test Plan:
yarn test
yarn flow
yarn lint
Question:
@TheSavior Would the types seen here in
ProgressBarAndroid.android.js
need to be duplicated or moved into my new file? I wasn't sure if they are meant to be, considering they are being exported.