diff --git a/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js b/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js index 18662d32933f80..51e79f707e8d64 100644 --- a/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +++ b/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js @@ -9,11 +9,10 @@ */ import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes'; -import requireNativeComponent from '../../ReactNative/requireNativeComponent'; import codegenNativeCommands from '../../Utilities/codegenNativeCommands'; import type {TextInputNativeCommands} from './TextInputNativeCommands'; import RCTTextInputViewConfig from './RCTTextInputViewConfig'; -import ReactNativeViewConfigRegistry from '../../Renderer/shims/ReactNativeViewConfigRegistry'; +import * as NativeComponentRegistry from '../../NativeComponent/NativeComponentRegistry'; type NativeType = HostComponent; @@ -23,17 +22,10 @@ export const Commands: NativeCommands = codegenNativeCommands({ supportedCommands: ['focus', 'blur', 'setTextAndSelection'], }); -let MultilineTextInputNativeComponent; -if (global.RN$Bridgeless) { - ReactNativeViewConfigRegistry.register('RCTMultilineTextInputView', () => { - return RCTTextInputViewConfig; - }); - MultilineTextInputNativeComponent = 'RCTMultilineTextInputView'; -} else { - MultilineTextInputNativeComponent = requireNativeComponent( - 'RCTMultilineTextInputView', - ); -} +const MultilineTextInputNativeComponent: HostComponent = NativeComponentRegistry.get( + 'RCTMultilineTextInputView', + () => RCTTextInputViewConfig, +); // flowlint-next-line unclear-type:off export default ((MultilineTextInputNativeComponent: any): HostComponent);