mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
RN: Remove Native Prop Validation
Summary: As we migrate over to static typing solutions for props, we cannot rely on always having `propTypes` available at runtime. This gets us started on that journey by removing the native prop validation that happens when we require native components. bypass-lint Reviewed By: TheSavior Differential Revision: D7976854 fbshipit-source-id: f3ab579a7f0f8cfb716b0eb7fd4625f8168f3d96
This commit is contained in:
committed by
Facebook Github Bot
parent
6c910549d8
commit
8dc3ba0444
@@ -40,24 +40,22 @@ let AndroidTextInput;
|
||||
let RCTMultilineTextInputView;
|
||||
let RCTSinglelineTextInputView;
|
||||
|
||||
if (Platform.OS === 'android') {
|
||||
AndroidTextInput = requireNativeComponent('AndroidTextInput');
|
||||
} else if (Platform.OS === 'ios') {
|
||||
RCTMultilineTextInputView = requireNativeComponent(
|
||||
'RCTMultilineTextInputView',
|
||||
);
|
||||
RCTSinglelineTextInputView = requireNativeComponent(
|
||||
'RCTSinglelineTextInputView',
|
||||
);
|
||||
}
|
||||
|
||||
const onlyMultiline = {
|
||||
onTextInput: true,
|
||||
children: true,
|
||||
};
|
||||
|
||||
if (Platform.OS === 'android') {
|
||||
AndroidTextInput = requireNativeComponent('AndroidTextInput', null);
|
||||
} else if (Platform.OS === 'ios') {
|
||||
RCTMultilineTextInputView = requireNativeComponent(
|
||||
'RCTMultilineTextInputView',
|
||||
null,
|
||||
);
|
||||
RCTSinglelineTextInputView = requireNativeComponent(
|
||||
'RCTSinglelineTextInputView',
|
||||
null,
|
||||
);
|
||||
}
|
||||
|
||||
type Event = Object;
|
||||
type Selection = {
|
||||
start: number,
|
||||
|
||||
Reference in New Issue
Block a user