-
Notifications
You must be signed in to change notification settings - Fork 24.2k
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
[Standalone for NativeComponents] RCTSlider #23048
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.
|
||
const requireNativeComponent = require('requireNativeComponent'); | ||
|
||
module.exports = requireNativeComponent('RCTSlider'); |
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.
prettier/prettier: Insert ⏎
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.
I got it.
|
||
const requireNativeComponent = require('requireNativeComponent'); | ||
|
||
module.exports = requireNativeComponent('RCTSlider'); |
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.
eol-last: Newline required at end of file but not found.
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.
I got it.
|
||
const requireNativeComponent = require('requireNativeComponent'); | ||
|
||
module.exports = requireNativeComponent('RCTSlider'); |
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.
We want to have flow types for these components defined in these files too. Take a look at some of the other PRs as an example.
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.
I see. I'll modify these components.
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.flow
found some issues.
|
||
type RCTSliderType = Class<NativeComponent<NativeProps>>; | ||
|
||
module.exports = ((requireNativeComponent('RCTSlider'): any): RCTSliderType; |
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.
Unexpected token ;
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.
I think you are missing a closing paren here.
import type {ImageSource} from 'ImageSource'; | ||
import type {ViewStyleProp} from 'StyleSheet'; | ||
import type {ColorValue} from 'StyleSheetTypes'; | ||
import type {ViewProps} from 'ViewPropTypes'; | ||
import type {SyntheticEvent} from 'CoreEventTypes'; | ||
|
||
const RCTSlider = requireNativeComponent('RCTSlider'); | ||
const RCTSliderNativeComponent = require('RCTSliderNativeComponent'); |
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.
Importing from an untyped module makes it any
and is not safe! Did you mean to add // @flow
to the top of RCTSliderNativeComponent
? (untyped-import
)
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.
It looks like the analyze job is failing on your PR. Can you go through the errors on that and work on getting that to pass?
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.
@OdaDaisuke merged commit 7e82e45 into |
Summary: Changelog: [iOS] [Changed] - Deal with facebook#22990. Move `requireNativeComponent` to a separate file. Pull Request resolved: facebook#23048 Differential Revision: D13760373 Pulled By: cpojer fbshipit-source-id: ff8cc9d468dc3bac55fc3d4156ad695dcdd10ab8
Summary: Changelog: [iOS] [Changed] - Deal with #22990. Move `requireNativeComponent` to a separate file. Pull Request resolved: facebook/react-native#23048 Differential Revision: D13760373 Pulled By: cpojer fbshipit-source-id: ff8cc9d468dc3bac55fc3d4156ad695dcdd10ab8
Summary: Changelog: [iOS] [Changed] - Deal with #22990. Move `requireNativeComponent` to a separate file. Pull Request resolved: facebook/react-native#23048 Differential Revision: D13760373 Pulled By: cpojer fbshipit-source-id: ff8cc9d468dc3bac55fc3d4156ad695dcdd10ab8
Changelog:
[iOS] [Changed] - Deal with #22990. Move
requireNativeComponent
to a separate file.Test Plan: