diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index d90349412..f96c1852f 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -40,9 +40,12 @@ var notMultiline = { onSubmitEditing: true, }; -var AndroidTextInput = requireNativeComponent('AndroidTextInput', null); -var RCTTextView = requireNativeComponent('RCTTextView', null); -var RCTTextField = requireNativeComponent('RCTTextField', null); +if (Platform.OS === 'android') { + var AndroidTextInput = requireNativeComponent('AndroidTextInput', null); +} else if (Platform.OS === 'ios') { + var RCTTextView = requireNativeComponent('RCTTextView', null); + var RCTTextField = requireNativeComponent('RCTTextField', null); +} type Event = Object;