From 1ccf9f3090c1de17cf8af5de0b847e86254a45cf Mon Sep 17 00:00:00 2001 From: Slava Odoev Date: Mon, 17 Dec 2018 11:04:51 +0300 Subject: [PATCH] add nativeID to view props --- types/react-native/index.d.ts | 10 ++++++++++ types/react-native/test/index.tsx | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index ae3127bc1d..2c8575b211 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -912,6 +912,11 @@ export interface TextProps extends TextPropsIOS, TextPropsAndroid, Accessibility * Used to locate this view in end-to-end tests. */ testID?: string; + + /** + * Used to reference react managed views from native code. + */ + nativeID?: string; } /** @@ -2031,6 +2036,11 @@ export interface ViewProps * Used to locate this view in end-to-end tests. */ testID?: string; + + /** + * Used to reference react managed views from native code. + */ + nativeID?: string; } /** diff --git a/types/react-native/test/index.tsx b/types/react-native/test/index.tsx index 79c5a111ca..f3dfb45b51 100644 --- a/types/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -832,3 +832,12 @@ const SwitchColorTest = () => ( const SwitchThumbColorTest = () => ( ) + +const NativeIDTest = () => ( + + + + Text + + +)