diff --git a/native/account/registration/registration-text-input.react.js b/native/account/registration/registration-text-input.react.js --- a/native/account/registration/registration-text-input.react.js +++ b/native/account/registration/registration-text-input.react.js @@ -85,12 +85,10 @@ }, }; -const RegistrationTextInput: React.AbstractComponent< +const RegistrationTextInput: React.ComponentType = React.forwardRef< Props, React.ElementRef, -> = React.forwardRef>( - ForwardedRegistrationTextInput, -); +>(ForwardedRegistrationTextInput); RegistrationTextInput.displayName = 'RegistrationTextInput'; const MemoizedRegistrationTextInput: typeof RegistrationTextInput = React.memo< diff --git a/native/bottom-sheet/bottom-sheet.react.js b/native/bottom-sheet/bottom-sheet.react.js --- a/native/bottom-sheet/bottom-sheet.react.js +++ b/native/bottom-sheet/bottom-sheet.react.js @@ -65,12 +65,10 @@ }, }; -const BottomSheet: React.AbstractComponent< +const BottomSheet: React.ComponentType = React.forwardRef< Props, React.ElementRef, -> = React.forwardRef>( - ForwardedBottomSheet, -); +>(ForwardedBottomSheet); BottomSheet.displayName = 'BottomSheet'; const MemoizedBottomSheet: typeof BottomSheet = React.memo< diff --git a/native/chat/chat-thread-list-search.react.js b/native/chat/chat-thread-list-search.react.js --- a/native/chat/chat-thread-list-search.react.js +++ b/native/chat/chat-thread-list-search.react.js @@ -156,12 +156,10 @@ }, }; -const ChatThreadListSearch: React.AbstractComponent< +const ChatThreadListSearch: React.ComponentType = React.forwardRef< Props, React.ElementRef, -> = React.forwardRef>( - ForwardedChatThreadListSearch, -); +>(ForwardedChatThreadListSearch); ChatThreadListSearch.displayName = 'ChatThreadListSearch'; export default ChatThreadListSearch; diff --git a/native/components/full-screen-view-modal.react.js b/native/components/full-screen-view-modal.react.js --- a/native/components/full-screen-view-modal.react.js +++ b/native/components/full-screen-view-modal.react.js @@ -55,9 +55,8 @@ const decayConfig = { deceleration: 0.99 }; -type TouchableOpacityInstance = React.AbstractComponent< +type TouchableOpacityInstance = React.ComponentType< React.ElementConfig, - NativeMethods, >; type ButtonDimensions = { diff --git a/native/components/gesture-touchable-opacity.react.js b/native/components/gesture-touchable-opacity.react.js --- a/native/components/gesture-touchable-opacity.react.js +++ b/native/components/gesture-touchable-opacity.react.js @@ -188,12 +188,10 @@ ); } -const GestureTouchableOpacity: React.AbstractComponent< +const GestureTouchableOpacity: React.ComponentType = React.forwardRef< Props, TapGestureHandler, -> = React.forwardRef( - ForwardedGestureTouchableOpacity, -); +>(ForwardedGestureTouchableOpacity); GestureTouchableOpacity.displayName = 'GestureTouchableOpacity'; export default GestureTouchableOpacity; diff --git a/native/components/search.react.js b/native/components/search.react.js --- a/native/components/search.react.js +++ b/native/components/search.react.js @@ -103,12 +103,10 @@ ); } -const Search: React.AbstractComponent< +const Search: React.ComponentType = React.forwardRef< Props, React.ElementRef, -> = React.forwardRef>( - ForwardedSearch, -); +>(ForwardedSearch); Search.displayName = 'Search'; const unboundStyles = { diff --git a/native/components/selectable-text-input.react.ios.js b/native/components/selectable-text-input.react.ios.js --- a/native/components/selectable-text-input.react.ios.js +++ b/native/components/selectable-text-input.react.ios.js @@ -132,11 +132,9 @@ ); }); -const MemoizedSelectableTextInput: React.AbstractComponent< - SelectableTextInputProps, - SelectableTextInputRef, -> = React.memo( - SelectableTextInput, -); +const MemoizedSelectableTextInput: React.ComponentType = + React.memo( + SelectableTextInput, + ); export default MemoizedSelectableTextInput; diff --git a/native/components/selectable-text-input.react.js b/native/components/selectable-text-input.react.js --- a/native/components/selectable-text-input.react.js +++ b/native/components/selectable-text-input.react.js @@ -78,11 +78,9 @@ ); }); -const MemoizedSelectableTextInput: React.AbstractComponent< - SelectableTextInputProps, - SelectableTextInputRef, -> = React.memo( - SelectableTextInput, -); +const MemoizedSelectableTextInput: React.ComponentType = + React.memo( + SelectableTextInput, + ); export default MemoizedSelectableTextInput; diff --git a/native/components/tag-input.react.js b/native/components/tag-input.react.js --- a/native/components/tag-input.react.js +++ b/native/components/tag-input.react.js @@ -456,10 +456,7 @@ typeof BaseTagInput.defaultProps, >; -function createTagInput(): React.AbstractComponent< - BaseConfig, - BaseTagInput, -> { +function createTagInput(): React.ComponentType> { return React.forwardRef, BaseTagInput>( function ForwardedTagInput( props: BaseConfig, diff --git a/native/components/text-input.react.js b/native/components/text-input.react.js --- a/native/components/text-input.react.js +++ b/native/components/text-input.react.js @@ -18,12 +18,10 @@ ); } -const WrappedTextInput: React.AbstractComponent< +const WrappedTextInput: React.ComponentType = React.forwardRef< Props, React.ElementRef, -> = React.forwardRef>( - ForwardedTextInput, -); +>(ForwardedTextInput); WrappedTextInput.displayName = 'CommTextInput'; export default WrappedTextInput; diff --git a/native/flow-typed/npm/@react-navigation/core_v6.x.x.js b/native/flow-typed/npm/@react-navigation/core_v6.x.x.js --- a/native/flow-typed/npm/@react-navigation/core_v6.x.x.js +++ b/native/flow-typed/npm/@react-navigation/core_v6.x.x.js @@ -2296,15 +2296,14 @@ |}, |}; - declare export type NavigationContainerType = React$AbstractComponent< + declare export type NavigationContainerType = React.ComponentType< {| ...BaseNavigationContainerProps, +theme?: Theme, +linking?: LinkingOptions, +fallback?: React$Node, +onReady?: () => mixed, - |}, - BaseNavigationContainerInterface, + |} >; //--------------------------------------------------------------------------- @@ -2345,9 +2344,8 @@ * Navigator utils */ - declare export var BaseNavigationContainer: React$AbstractComponent< - BaseNavigationContainerProps, - BaseNavigationContainerInterface, + declare export var BaseNavigationContainer: React.ComponentType< + BaseNavigationContainerProps >; declare export var createNavigatorFactory: CreateNavigatorFactory; diff --git a/native/flow-typed/npm/@react-navigation/native_v6.x.x.js b/native/flow-typed/npm/@react-navigation/native_v6.x.x.js --- a/native/flow-typed/npm/@react-navigation/native_v6.x.x.js +++ b/native/flow-typed/npm/@react-navigation/native_v6.x.x.js @@ -78,9 +78,8 @@ * Navigator utils */ - declare export var BaseNavigationContainer: React$AbstractComponent< - BaseNavigationContainerProps, - BaseNavigationContainerInterface, + declare export var BaseNavigationContainer: React.ComponentType< + BaseNavigationContainerProps >; declare export var createNavigatorFactory: CreateNavigatorFactory; diff --git a/native/media/camera-modal.react.js b/native/media/camera-modal.react.js --- a/native/media/camera-modal.react.js +++ b/native/media/camera-modal.react.js @@ -56,7 +56,6 @@ import { updateDeviceCameraInfoActionType } from '../redux/action-types.js'; import { useSelector } from '../redux/redux-utils.js'; import { colors } from '../themes/colors.js'; -import type { NativeMethods } from '../types/react-native.js'; import { clamp } from '../utils/animation-utils.js'; Reanimated.addWhitelistedNativeProps({ @@ -95,9 +94,8 @@ } catch (e) {} } -type TouchableOpacityInstance = React.AbstractComponent< +type TouchableOpacityInstance = React.ComponentType< React.ElementConfig, - NativeMethods, >; type Dimensions = { diff --git a/native/media/video-playback-modal.react.js b/native/media/video-playback-modal.react.js --- a/native/media/video-playback-modal.react.js +++ b/native/media/video-playback-modal.react.js @@ -42,9 +42,8 @@ } from '../types/layout-types.js'; import type { NativeMethods } from '../types/react-native.js'; -type TouchableOpacityInstance = React.AbstractComponent< +type TouchableOpacityInstance = React.ComponentType< React.ElementConfig, - NativeMethods, >; type VideoRef = { diff --git a/web/account/password-input.react.js b/web/account/password-input.react.js --- a/web/account/password-input.react.js +++ b/web/account/password-input.react.js @@ -43,9 +43,7 @@ ); } -const ForwardedPasswordInput: React.AbstractComponent< - PasswordInputProps, - HTMLInputElement, -> = React.forwardRef(PasswordInput); +const ForwardedPasswordInput: React.ComponentType = + React.forwardRef(PasswordInput); export default ForwardedPasswordInput; diff --git a/web/components/search.react.js b/web/components/search.react.js --- a/web/components/search.react.js +++ b/web/components/search.react.js @@ -59,7 +59,9 @@ ); } -const ForwardedSearch: React.AbstractComponent = - React.forwardRef(Search); +const ForwardedSearch: React.ComponentType = React.forwardRef< + Props, + HTMLInputElement, +>(Search); export default ForwardedSearch; diff --git a/web/media/loadable-video.react.js b/web/media/loadable-video.react.js --- a/web/media/loadable-video.react.js +++ b/web/media/loadable-video.react.js @@ -97,9 +97,9 @@ ); } -const MemoizedLoadableVideo: React.AbstractComponent = - React.memo( - React.forwardRef(LoadableVideo), - ); +const MemoizedLoadableVideo: React.ComponentType = React.memo< + Props, + HTMLVideoElement, +>(React.forwardRef(LoadableVideo)); export default MemoizedLoadableVideo; diff --git a/web/modals/input.react.js b/web/modals/input.react.js --- a/web/modals/input.react.js +++ b/web/modals/input.react.js @@ -61,7 +61,9 @@ ); } -const ForwardedInput: React.AbstractComponent = - React.forwardRef(Input); +const ForwardedInput: React.ComponentType = React.forwardRef< + InputProps, + HTMLInputElement, +>(Input); export default ForwardedInput;