From 5d07c7232c8639c62087a6f4e778694350648f96 Mon Sep 17 00:00:00 2001 From: Fabrizio Cucci Date: Thu, 10 Oct 2024 10:59:58 -0700 Subject: [PATCH] Replace React.AbstractComponent with `component` type in TextInput (#46925) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46925 Prepare for the ref-as-prop typing change in flow. Changelog: [Internal] Reviewed By: SamChou19815 Differential Revision: D64109824 fbshipit-source-id: 9823a459c9bd4f3eed4d3c560f0bdaf4be16d410 --- .../Libraries/Components/TextInput/TextInput.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-native/Libraries/Components/TextInput/TextInput.js b/packages/react-native/Libraries/Components/TextInput/TextInput.js index 8eeb465cf5f..ad5a1d83e60 100644 --- a/packages/react-native/Libraries/Components/TextInput/TextInput.js +++ b/packages/react-native/Libraries/Components/TextInput/TextInput.js @@ -1787,11 +1787,11 @@ const autoCompleteWebToTextContentTypeMap = { username: 'username', }; -const ExportedForwardRef: React.AbstractComponent< - React.ElementConfig, - TextInputInstance, +const ExportedForwardRef: component( + ref: React.RefSetter, + ...props: React.ElementConfig // $FlowFixMe[incompatible-call] -> = React.forwardRef(function TextInput( +) = React.forwardRef(function TextInput( { allowFontScaling = true, rejectResponderTermination = true,