Skip to content

Commit 2ad845c

Browse files
rubennortefacebook-github-bot
authored andcommitted
Ship DOM APIs to stable (#53360)
Summary: Pull Request resolved: #53360 Changelog: [General][Breaking] - Enable DOM APIs in host component refs This ships DOM APIs to stable now that we have a cohesive API and it's been stable at Meta for a while. This changes the `HostInstance` type (exported from the `react-native` package and used by all host components) from being an interface to being a class (`ReactNativeElement`). **The API is backwards compatible** but given we're changing the definition of `HostInstance` from an interface to a class, this can be considered a **breaking change for TypeScript** (not at runtime). ## Previous API - [`measure`](https://reactnative.dev/docs/the-new-architecture/layout-measurements#measurecallback) - [`measureInWindow`](https://reactnative.dev/docs/the-new-architecture/layout-measurements#measureinwindowcallback) - `measureLayout` - [`setNativeProps`](https://reactnative.dev/docs/the-new-architecture/direct-manipulation-new-architecture#setnativeprops-to-edit-textinput-value) ## New API From [`HTMLElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement): - Properties - [`offsetHeight`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight) - [`offsetLeft`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetLeft) - [`offsetParent`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent) - [`offsetTop`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetTop) - [`offsetWidth`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetWidth) - Methods - [`blur`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/blur). - This method was also [available](/docs/next/legacy/direct-manipulation#blur) in the legacy architecture. - [`focus`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus). - This method was also [available](/docs/next/legacy/direct-manipulation#focus) in the legacy architecture. - The `options` parameter is not supported. From [`Element`](https://developer.mozilla.org/en-US/docs/Web/API/Element): - Properties - [`childElementCount`](https://developer.mozilla.org/en-US/docs/Web/API/Element/childElementCount) - [`children`](https://developer.mozilla.org/en-US/docs/Web/API/Element/children) - [`clientHeight`](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientHeight) - [`clientLeft`](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientLeft) - [`clientTop`](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientTop) - [`clientWidth`](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientWidth) - [`firstElementChild`](https://developer.mozilla.org/en-US/docs/Web/API/Element/firstElementChild) - [`id`](https://developer.mozilla.org/en-US/docs/Web/API/Element/id) - Returns the value of the `id` or `nativeID` props. - [`lastElementChild`](https://developer.mozilla.org/en-US/docs/Web/API/Element/lastElementChild) - [`nextElementSibling`](https://developer.mozilla.org/en-US/docs/Web/API/Element/nextElementSibling) - [`nodeName`](https://developer.mozilla.org/en-US/docs/Web/API/Element/nodeName) - [`nodeType`](https://developer.mozilla.org/en-US/docs/Web/API/Element/nodeType) - [`nodeValue`](https://developer.mozilla.org/en-US/docs/Web/API/Element/nodeValue) - [`previousElementSibling`](https://developer.mozilla.org/en-US/docs/Web/API/Element/previousElementSibling) - [`scrollHeight`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight) - [`scrollLeft`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft) - For built-in components, only `ScrollView` instances can return a value other than zero. - [`scrollTop`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTop) - For built-in components, only `ScrollView` instances can return a value other than zero. - [`scrollWidth`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollWidth) - [`tagName`](https://developer.mozilla.org/en-US/docs/Web/API/Element/tagName) - Returns a normalized native component name prefixed with `RN:`, like `RN:View`. - [`textContent`](https://developer.mozilla.org/en-US/docs/Web/API/Element/textContent) - Methods - [`getBoundingClientRect`](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect) - [`hasPointerCapture`](https://developer.mozilla.org/en-US/docs/Web/API/Element/hasPointerCapture) - [`setPointerCapture`](https://developer.mozilla.org/en-US/docs/Web/API/Element/setPointerCapture) - [`releasePointerCapture`](https://developer.mozilla.org/en-US/docs/Web/API/Element/releasePointerCapture) From [`Node`](https://developer.mozilla.org/en-US/docs/Web/API/Node): - Properties - [`childNodes`](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes) - [`firstChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/firstChild) - [`isConnected`](https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected) - [`lastChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/lastChild) - [`nextSibling`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nextSibling) - [`nodeName`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeName) - [`nodeType`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType) - [`nodeValue`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeValue) - [`ownerDocument`](https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument) - Will return the [document instance](/docs/next/document-instances) where this component was rendered. - [`parentElement`](https://developer.mozilla.org/en-US/docs/Web/API/Node/parentElement) - [`parentNode`](https://developer.mozilla.org/en-US/docs/Web/API/Node/parentNode) - [`previousSibling`](https://developer.mozilla.org/en-US/docs/Web/API/Node/previousSibling) - [`textContent`](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent) - Methods - [`compareDocumentPosition`](https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition) - [`contains`](https://developer.mozilla.org/en-US/docs/Web/API/Node/contains) - [`getRootNode`](https://developer.mozilla.org/en-US/docs/Web/API/Node/getRootNode) - [`hasChildNodes`](https://developer.mozilla.org/en-US/docs/Web/API/Node/hasChildNodes) ### Legacy API - [`measure`](https://reactnative.dev/docs/the-new-architecture/layout-measurements#measurecallback) - [`measureInWindow`](https://reactnative.dev/docs/the-new-architecture/layout-measurements#measureinwindowcallback) - `measureLayout` - [`setNativeProps`](https://reactnative.dev/docs/the-new-architecture/direct-manipulation-new-architecture#setnativeprops-to-edit-textinput-value) ### New APIs Additionally, this exposes access to document nodes and text nodes that were not available before. This will be properly documented on the website at part of the release of 0.82, that will contain this changes. Reviewed By: GijsWeterings Differential Revision: D78562721 fbshipit-source-id: 139aee6969f3ecdc65cffcd31cd1754f367d9122
1 parent e04bbf0 commit 2ad845c

File tree

7 files changed

+105
-94
lines changed

7 files changed

+105
-94
lines changed

packages/react-native/Libraries/Components/TextInput/TextInput.flow.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import type {
1818
} from '../../Types/CoreEventTypes';
1919
import type {ViewProps} from '../View/ViewPropTypes';
2020

21+
import ReactNativeElement from '../../../src/private/webapis/dom/nodes/ReactNativeElement';
2122
import {type ColorValue, type TextStyleProp} from '../../StyleSheet/StyleSheet';
2223
import * as React from 'react';
2324

@@ -1037,13 +1038,19 @@ export type TextInputProps = $ReadOnly<{
10371038
...TextInputBaseProps,
10381039
}>;
10391040

1040-
export interface TextInputInstance extends HostInstance {
1041-
+clear: () => void;
1042-
+isFocused: () => boolean;
1043-
+getNativeRef: () => ?HostInstance;
1044-
+setSelection: (start: number, end: number) => void;
1041+
/**
1042+
* TextInput monkey-patches the native element instance with these methods.
1043+
* It isn't technically a class but this is the most elegant way to type it.
1044+
*/
1045+
declare class _TextInputInstance extends ReactNativeElement {
1046+
clear(): void;
1047+
isFocused(): boolean;
1048+
getNativeRef(): ?ReactNativeElement;
1049+
setSelection(start: number, end: number): void;
10451050
}
10461051

1052+
export type TextInputInstance = _TextInputInstance;
1053+
10471054
/**
10481055
* A foundational component for inputting text into the app via a
10491056
* keyboard. Props provide configurability for several features, such as

packages/react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ export default class ReactFabricHostComponent implements NativeMethods {
5858
}
5959

6060
blur() {
61-
// $FlowFixMe[incompatible-call] - Error supressed during the migration of HostInstance to ReactNativeElement
61+
// $FlowFixMe - Error supressed during the migration of HostInstance to ReactNativeElement
6262
TextInputState.blurTextInput(this);
6363
}
6464

6565
focus() {
66-
// $FlowFixMe[incompatible-call] - Error supressed during the migration of HostInstance to ReactNativeElement
66+
// $FlowFixMe - Error supressed during the migration of HostInstance to ReactNativeElement
6767
TextInputState.focusTextInput(this);
6868
}
6969

packages/react-native/ReactNativeApi.d.ts

Lines changed: 82 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<50520041f6fb4d55a59f063dab8469a4>>
7+
* @generated SignedSource<<b43428758b3aefd30b2bd8a32ec0878a>>
88
*
99
* This file was generated by scripts/js-api/build-types/index.js.
1010
*/
@@ -1003,6 +1003,12 @@ declare type ____ViewStyle_InternalOverrides = {}
10031003
declare type ____ViewStyleProp_Internal = StyleProp<
10041004
Readonly<Partial<____ViewStyle_Internal>>
10051005
>
1006+
declare class _TextInputInstance extends ReactNativeElement_default {
1007+
clear(): void
1008+
getNativeRef(): ReactNativeElement_default | undefined
1009+
isFocused(): boolean
1010+
setSelection(start: number, end: number): void
1011+
}
10061012
declare type $$AndroidSwitchNativeComponent =
10071013
typeof $$AndroidSwitchNativeComponent
10081014
declare type $$AnimatedFlatList = typeof $$AnimatedFlatList
@@ -2484,7 +2490,7 @@ declare type HostComponent<Config extends {}> = (
24842490
ref?: React.Ref<HostInstance>
24852491
},
24862492
) => React.ReactNode
2487-
declare type HostInstance = LegacyHostInstanceMethods
2493+
declare type HostInstance = ReactNativeElement_default
24882494
declare class HTMLCollection_default<T> implements Iterable<T>, ArrayLike_2<T> {
24892495
[index: number]: T
24902496
readonly length: number
@@ -5307,12 +5313,7 @@ declare type TextInputEndEditingEventData = Readonly<
53075313
}
53085314
>
53095315
declare type TextInputFocusEvent = FocusEvent
5310-
declare interface TextInputInstance extends HostInstance {
5311-
readonly clear: () => void
5312-
readonly getNativeRef: () => HostInstance | undefined
5313-
readonly isFocused: () => boolean
5314-
readonly setSelection: (start: number, end: number) => void
5315-
}
5316+
declare type TextInputInstance = _TextInputInstance
53165317
declare type TextInputIOSProps = {
53175318
readonly clearButtonMode?:
53185319
| "always"
@@ -5949,7 +5950,7 @@ declare type WrapperComponentProvider = (
59495950
appParameters: Object,
59505951
) => React.ComponentType<any>
59515952
export {
5952-
AccessibilityActionEvent, // 9247c3f0
5953+
AccessibilityActionEvent, // f6181a2c
59535954
AccessibilityInfo, // 70604904
59545955
AccessibilityProps, // 5a2836fc
59555956
AccessibilityRole, // f2f2e066
@@ -5958,14 +5959,14 @@ export {
59585959
ActionSheetIOS, // 88e6bfb0
59595960
ActionSheetIOSOptions, // 1756eb5a
59605961
ActivityIndicator, // 8d041a45
5961-
ActivityIndicatorProps, // 0edeb628
5962+
ActivityIndicatorProps, // 0fa4e79d
59625963
Alert, // 5bf12165
59635964
AlertButton, // bf1a3b60
59645965
AlertButtonStyle, // ec9fb242
59655966
AlertOptions, // a0cdac0f
59665967
AlertType, // 5ab91217
59675968
AndroidKeyboardEvent, // e03becc8
5968-
Animated, // b3949f33
5969+
Animated, // 6b0cea93
59695970
AppConfig, // ebddad4b
59705971
AppRegistry, // 6cdee1d6
59715972
AppState, // f7097b1b
@@ -5975,12 +5976,12 @@ export {
59755976
AutoCapitalize, // c0e857a0
59765977
BackHandler, // a9f9bad9
59775978
BackPressEventName, // 4620fb76
5978-
BlurEvent, // ab745200
5979+
BlurEvent, // 870b9bb5
59795980
BoxShadowValue, // b679703f
59805981
Button, // dd130b61
5981-
ButtonProps, // 99495f51
5982+
ButtonProps, // 3c081e75
59825983
Clipboard, // 9b8c878e
5983-
CodegenTypes, // 1b38ac82
5984+
CodegenTypes, // 030a94b8
59845985
ColorSchemeName, // 31a4350e
59855986
ColorValue, // 98989a8f
59865987
ComponentProvider, // b5c60ddd
@@ -5997,8 +5998,8 @@ export {
59975998
DisplayMetrics, // 1dc35cef
59985999
DisplayMetricsAndroid, // 872e62eb
59996000
DrawerLayoutAndroid, // 14121b61
6000-
DrawerLayoutAndroidProps, // 11c0dfe2
6001-
DrawerSlideEvent, // ad024574
6001+
DrawerLayoutAndroidProps, // 123d3a9d
6002+
DrawerSlideEvent, // cc43db83
60026003
DropShadowValue, // e9df2606
60036004
DynamicColorIOS, // 1f9b3410
60046005
DynamicColorIOSTuple, // 023ce58e
@@ -6011,28 +6012,28 @@ export {
60116012
EventSubscription, // b8d084aa
60126013
ExtendedExceptionData, // 5a6ccf5a
60136014
FilterFunction, // bf24c0e3
6014-
FlatList, // 0b12ef25
6015-
FlatListProps, // d185db31
6016-
FocusEvent, // 1dc2b592
6015+
FlatList, // 714df8ad
6016+
FlatListProps, // e3e724ea
6017+
FocusEvent, // 529b43eb
60176018
FontVariant, // 7c7558bb
6018-
GestureResponderEvent, // 9c9a1b0d
6019-
GestureResponderHandlers, // 2c0e77cb
6019+
GestureResponderEvent, // b466f6d6
6020+
GestureResponderHandlers, // 8356843d
60206021
Handle, // 2d65285d
6021-
HostComponent, // b6281cf9
6022-
HostInstance, // b159a964
6022+
HostComponent, // 5e13ff5a
6023+
HostInstance, // 489cbe7f
60236024
I18nManager, // f2fa58ce
60246025
IOSKeyboardEvent, // e67bfe3a
60256026
IgnorePattern, // ec6f6ece
60266027
Image, // 04474205
6027-
ImageBackground, // b588909c
6028-
ImageBackgroundProps, // f9de269c
6029-
ImageErrorEvent, // 66044485
6030-
ImageLoadEvent, // 62e6be9b
6031-
ImageProgressEventIOS, // 3d6ffb7a
6032-
ImageProps, // d77401e6
6028+
ImageBackground, // e74abb26
6029+
ImageBackgroundProps, // cadc2fba
6030+
ImageErrorEvent, // b7b2ae63
6031+
ImageLoadEvent, // 5baae813
6032+
ImageProgressEventIOS, // adb35052
6033+
ImageProps, // 40c727e1
60336034
ImagePropsAndroid, // 9fd9bcbb
6034-
ImagePropsBase, // efd768f1
6035-
ImagePropsIOS, // c788030b
6035+
ImagePropsBase, // 715b84bf
6036+
ImagePropsIOS, // 318adce2
60366037
ImageRequireSource, // 681d683b
60376038
ImageResolvedAssetSource, // f3060931
60386039
ImageSize, // 1c47cf88
@@ -6046,8 +6047,8 @@ export {
60466047
Insets, // e7fe432a
60476048
InteractionManager, // 301bfa63
60486049
Keyboard, // 87311c77
6049-
KeyboardAvoidingView, // ab2d7999
6050-
KeyboardAvoidingViewProps, // 8e348419
6050+
KeyboardAvoidingView, // d88d0d4c
6051+
KeyboardAvoidingViewProps, // bc844418
60516052
KeyboardEvent, // c3f895d4
60526053
KeyboardEventEasing, // af4091c8
60536054
KeyboardEventName, // 59299ad6
@@ -6060,7 +6061,7 @@ export {
60606061
LayoutAnimationProperty, // 52995f01
60616062
LayoutAnimationType, // 2da0a29b
60626063
LayoutAnimationTypes, // 081b3bde
6063-
LayoutChangeEvent, // 697f2b5c
6064+
LayoutChangeEvent, // c674f902
60646065
LayoutConformanceProps, // 055f03b8
60656066
LayoutRectangle, // 6601b294
60666067
Linking, // 292de0a0
@@ -6072,31 +6073,31 @@ export {
60726073
MeasureLayoutOnSuccessCallback, // 3592502a
60736074
MeasureOnSuccessCallback, // 82824e59
60746075
Modal, // 78e8a79d
6075-
ModalBaseProps, // 574f2b2d
6076-
ModalProps, // 3fb62261
6076+
ModalBaseProps, // 0c81c9b1
6077+
ModalProps, // 270223fa
60776078
ModalPropsAndroid, // 515fb173
6078-
ModalPropsIOS, // 6053cb61
6079-
ModeChangeEvent, // 0d79bb94
6080-
MouseEvent, // d432147f
6079+
ModalPropsIOS, // 4fbcedf6
6080+
ModeChangeEvent, // b889a7ce
6081+
MouseEvent, // 53ede3db
60816082
NativeAppEventEmitter, // b4d20c1d
60826083
NativeColorValue, // d2094c29
6083-
NativeComponentRegistry, // b4954306
6084+
NativeComponentRegistry, // 7fd99ba6
60846085
NativeDialogManagerAndroid, // 6254873e
60856086
NativeEventEmitter, // d72906cc
60866087
NativeEventSubscription, // de3942e7
6087-
NativeMethods, // 5adf5f75
6088-
NativeMethodsMixin, // 518cbd6c
6088+
NativeMethods, // 03dc51c5
6089+
NativeMethodsMixin, // 4b061b7e
60896090
NativeModules, // 1cf72876
6090-
NativeMouseEvent, // 2d5b5c9f
6091-
NativePointerEvent, // 5f27ae9c
6091+
NativeMouseEvent, // ff25cf35
6092+
NativePointerEvent, // 89c1f3ad
60926093
NativeScrollEvent, // caad7f53
6093-
NativeSyntheticEvent, // 29455160
6094+
NativeSyntheticEvent, // d2a1fe6a
60946095
NativeTouchEvent, // 59b676df
60956096
NativeUIEvent, // 44ac26ac
60966097
Networking, // b674447b
60976098
OpaqueColorValue, // 25f3fa5b
60986099
PanResponder, // 98a9b6fc
6099-
PanResponderCallbacks, // 0567f479
6100+
PanResponderCallbacks, // d325aa56
61006101
PanResponderGestureState, // 54baf558
61016102
PanResponderInstance, // c8b0d00c
61026103
Permission, // 06473f4f
@@ -6108,14 +6109,14 @@ export {
61086109
PlatformOSType, // 0a17561e
61096110
PlatformSelectSpec, // 09ed7758
61106111
PointValue, // 69db075f
6111-
PointerEvent, // 3c454015
6112+
PointerEvent, // ff3129ff
61126113
Pressable, // 3c6e4eb9
61136114
PressableAndroidRippleConfig, // 42bc9727
6114-
PressableProps, // 00d5ea16
6115+
PressableProps, // 96c8132d
61156116
PressableStateCallbackType, // 9af36561
61166117
ProcessedColorValue, // 33f74304
61176118
ProgressBarAndroid, // 03e66cf5
6118-
ProgressBarAndroidProps, // 9302458b
6119+
ProgressBarAndroidProps, // 29338dc2
61196120
PromiseTask, // 5102c862
61206121
PublicRootInstance, // 8040afd7
61216122
PublicTextInstance, // 7d73f802
@@ -6124,12 +6125,12 @@ export {
61246125
PushNotificationPermissions, // c2e7ae4f
61256126
Rationale, // 5df1b1c1
61266127
ReactNativeVersion, // abd76827
6127-
RefreshControl, // effd2a00
6128-
RefreshControlProps, // fca5a05f
6128+
RefreshControl, // 036f45cf
6129+
RefreshControlProps, // b7de1e77
61296130
RefreshControlPropsAndroid, // 99f64c97
61306131
RefreshControlPropsIOS, // 72a36381
61316132
Registry, // e1ed403e
6132-
ResponderSyntheticEvent, // dccf8514
6133+
ResponderSyntheticEvent, // e0d1564d
61336134
ReturnKeyTypeOptions, // afd47ba3
61346135
Role, // af7b889d
61356136
RootTag, // 3cd10504
@@ -6139,19 +6140,19 @@ export {
61396140
Runnables, // d3749ae1
61406141
SafeAreaView, // 4364c7bb
61416142
ScaledSize, // 07e417c7
6142-
ScrollEvent, // 865efb2e
6143-
ScrollResponderType, // 525b353d
6143+
ScrollEvent, // 84e5b805
6144+
ScrollResponderType, // d39056e7
61446145
ScrollToLocationParamsType, // d7ecdad1
61456146
ScrollView, // 7fb7c469
6146-
ScrollViewImperativeMethods, // 97a0b5ac
6147-
ScrollViewProps, // b276b839
6147+
ScrollViewImperativeMethods, // eb20aa46
6148+
ScrollViewProps, // 27986ff5
61486149
ScrollViewPropsAndroid, // 84e2134b
6149-
ScrollViewPropsIOS, // a2902f33
6150+
ScrollViewPropsIOS, // d83c9733
61506151
ScrollViewScrollToOptions, // 3313411e
61516152
SectionBase, // 0ccaedac
6152-
SectionList, // ba8c31d9
6153+
SectionList, // cc6dec0b
61536154
SectionListData, // 1c80bb2e
6154-
SectionListProps, // 177096d2
6155+
SectionListProps, // 97fcf95a
61556156
SectionListRenderItem, // cffebb53
61566157
SectionListRenderItemInfo, // 946c2128
61576158
Separators, // 6a45f7e3
@@ -6171,8 +6172,8 @@ export {
61716172
StyleSheet, // 02b98c20
61726173
SubmitBehavior, // c4ddf490
61736174
Switch, // aebc9941
6174-
SwitchChangeEvent, // 056868be
6175-
SwitchProps, // 57b2101f
6175+
SwitchChangeEvent, // 2e5bd2de
6176+
SwitchProps, // cb21930d
61766177
Systrace, // b5aa21fc
61776178
TVViewPropsIOS, // 330ce7b5
61786179
TargetedEvent, // 16e98910
@@ -6181,44 +6182,44 @@ export {
61816182
TextContentType, // 239b3ecc
61826183
TextInput, // 282b394e
61836184
TextInputAndroidProps, // 3f09ce49
6184-
TextInputChangeEvent, // 9cb24681
6185-
TextInputContentSizeChangeEvent, // f6f7ecae
6186-
TextInputEndEditingEvent, // 254671ea
6187-
TextInputFocusEvent, // 29cebb63
6185+
TextInputChangeEvent, // 380cbe93
6186+
TextInputContentSizeChangeEvent, // 5fba3f54
6187+
TextInputEndEditingEvent, // 8c22fac3
6188+
TextInputFocusEvent, // c36e977c
61886189
TextInputIOSProps, // 0d05a855
6189-
TextInputKeyPressEvent, // 8047f716
6190-
TextInputProps, // 5cda62e0
6191-
TextInputSelectionChangeEvent, // 3a657f0b
6192-
TextInputSubmitEditingEvent, // b350617f
6193-
TextLayoutEvent, // e289bd3c
6194-
TextProps, // 0f0be34d
6190+
TextInputKeyPressEvent, // 967178c2
6191+
TextInputProps, // 8f3237f1
6192+
TextInputSelectionChangeEvent, // a1a7622f
6193+
TextInputSubmitEditingEvent, // 48d903af
6194+
TextLayoutEvent, // 45b0a8d7
6195+
TextProps, // 95d8874d
61956196
TextStyle, // f3404e2b
61966197
ToastAndroid, // b4875e35
61976198
Touchable, // 93eb6c63
61986199
TouchableHighlight, // b4304a98
6199-
TouchableHighlightProps, // 7212b9cf
6200-
TouchableNativeFeedback, // 1562b2eb
6201-
TouchableNativeFeedbackProps, // 8a4eed44
6200+
TouchableHighlightProps, // c871f353
6201+
TouchableNativeFeedback, // aaa5b42c
6202+
TouchableNativeFeedbackProps, // 372d3213
62026203
TouchableOpacity, // 7e33acfd
6203-
TouchableOpacityProps, // 189c11df
6204-
TouchableWithoutFeedback, // d5fb023d
6205-
TouchableWithoutFeedbackProps, // 26d3cf4e
6204+
TouchableOpacityProps, // ba6c0ba4
6205+
TouchableWithoutFeedback, // 7363a906
6206+
TouchableWithoutFeedbackProps, // 68e3d87f
62066207
TransformsStyle, // 65e70f18
62076208
TurboModule, // dfe29706
62086209
TurboModuleRegistry, // 4ace6db2
62096210
UIManager, // 8d2c8281
62106211
UTFSequence, // baacd11b
62116212
Vibration, // 315e131d
62126213
View, // 39dd4de4
6213-
ViewProps, // 0ab8ceda
6214-
ViewPropsAndroid, // f3d007c3
6214+
ViewProps, // f8aca212
6215+
ViewPropsAndroid, // 21385d96
62156216
ViewPropsIOS, // 58ee19bf
62166217
ViewStyle, // c2db0e6e
62176218
VirtualViewMode, // 85a69ef6
62186219
VirtualizedList, // 4d513939
6219-
VirtualizedListProps, // 8526b87a
6220+
VirtualizedListProps, // 8efa6d8e
62206221
VirtualizedSectionList, // 446ba0df
6221-
VirtualizedSectionListProps, // de510cb4
6222+
VirtualizedSectionListProps, // c5e64f83
62226223
WrapperComponentProvider, // 9cf3844c
62236224
codegenNativeCommands, // e16d62f7
62246225
codegenNativeComponent, // ed4c8103

packages/react-native/jest/mockNativeComponent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ export default function mockNativeComponent<TProps: {...}>(
4747
Component.displayName = viewName;
4848
}
4949

50-
// $FlowFixMe[incompatible-return] - Error supressed during the migration of HostInstance to ReactNativeElement
50+
// $FlowFixMe - Error supressed during the migration of HostInstance to ReactNativeElement
5151
return Component;
5252
}

0 commit comments

Comments
 (0)