From d1e316fce3ddd01b43ee3361bee75e07b5e460ed Mon Sep 17 00:00:00 2001 From: Andrei Coman Date: Wed, 23 Sep 2015 17:03:06 -0700 Subject: [PATCH] Remove text input warnings Reviewed By: @mkonicek Differential Revision: D2471396 --- Libraries/Components/TextInput/TextInput.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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;