mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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
This commit is contained in:
committed by
Facebook Github Bot
parent
419722bd07
commit
e028ac7af2
@@ -170,7 +170,9 @@ class DrawerLayoutAndroid extends React.Component<Props, State> {
|
||||
drawerBackgroundColor: 'white',
|
||||
};
|
||||
|
||||
_nativeRef = React.createRef<AndroidDrawerLayoutNativeComponent>();
|
||||
_nativeRef = React.createRef<
|
||||
React.ElementRef<typeof AndroidDrawerLayoutNativeComponent>,
|
||||
>();
|
||||
|
||||
state: State = {statusBarBackgroundColor: null};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user