From e028ac7af2d5b48860f01055f3bbacf91f6b6956 Mon Sep 17 00:00:00 2001 From: Eli White Date: Tue, 24 Sep 2019 18:49:31 -0700 Subject: [PATCH] Fix ref and component return types Summary: These types aren't robust to changes in the React component type. When we refactor requireNativeComponent these will error. This change is forwards compatible. Changelog: [Internal] Improve internal type in DrawerLayoutAndroid Reviewed By: JoshuaGross Differential Revision: D17561194 fbshipit-source-id: 470289449b4d5b3148692f1945fb720e1e3972eb --- .../Components/DrawerAndroid/DrawerLayoutAndroid.android.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js b/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js index 0ce582734e7..b09f2fc8e8d 100644 --- a/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +++ b/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js @@ -170,7 +170,9 @@ class DrawerLayoutAndroid extends React.Component { drawerBackgroundColor: 'white', }; - _nativeRef = React.createRef(); + _nativeRef = React.createRef< + React.ElementRef, + >(); state: State = {statusBarBackgroundColor: null};