From f1f88b02e83b2f7f765488b8612168518393598f Mon Sep 17 00:00:00 2001 From: Ramanpreet Nara Date: Tue, 9 Nov 2021 00:27:31 -0800 Subject: [PATCH] Stop unnecessarily spreading ReactNativeViewViewConfig Summary: There's no need to spread ReactNativeViewViewConfig props into ViewConfig partials ourselves. createViewConfig does this for us: https://www.internalfb.com/code/fbsource/[b319a947b3e5]/xplat/js/react-native-github/Libraries/NativeComponent/ViewConfig.js?lines=20-50 Changelog: [Internal] Reviewed By: yungsters Differential Revision: D32187833 fbshipit-source-id: 6d7ea3fc808ccfc98e067f8f52334f7b3417d7a7 --- Libraries/Components/TextInput/AndroidTextInputViewConfig.js | 3 --- Libraries/Components/TextInput/RCTTextInputViewConfig.js | 2 -- 2 files changed, 5 deletions(-) diff --git a/Libraries/Components/TextInput/AndroidTextInputViewConfig.js b/Libraries/Components/TextInput/AndroidTextInputViewConfig.js index bb36f91ffbf..e659a3de64e 100644 --- a/Libraries/Components/TextInput/AndroidTextInputViewConfig.js +++ b/Libraries/Components/TextInput/AndroidTextInputViewConfig.js @@ -8,7 +8,6 @@ * @format */ -import ReactNativeViewViewConfig from '../../Components/View/ReactNativeViewViewConfig'; import type {PartialViewConfig} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; const AndroidTextInputViewConfig = { @@ -53,8 +52,6 @@ const AndroidTextInputViewConfig = { }, directEventTypes: {}, validAttributes: { - ...ReactNativeViewViewConfig.validAttributes, - maxFontSizeMultiplier: true, adjustsFontSizeToFit: true, minimumFontScale: true, diff --git a/Libraries/Components/TextInput/RCTTextInputViewConfig.js b/Libraries/Components/TextInput/RCTTextInputViewConfig.js index ecd4868759c..ef910892b23 100644 --- a/Libraries/Components/TextInput/RCTTextInputViewConfig.js +++ b/Libraries/Components/TextInput/RCTTextInputViewConfig.js @@ -9,7 +9,6 @@ */ import type {PartialViewConfig} from '../../Renderer/shims/ReactNativeTypes'; -import ReactNativeViewViewConfig from '../../Components/View/ReactNativeViewViewConfig'; const RCTTextInputViewConfig = { uiViewClassName: 'RCTSinglelineTextInputView', @@ -72,7 +71,6 @@ const RCTTextInputViewConfig = { }, directEventTypes: {}, validAttributes: { - ...ReactNativeViewViewConfig.validAttributes, fontSize: true, fontWeight: true, fontVariant: true,