From 455ab41dbb61099cd5bd0dcd54a8aa601497e52f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ullrich=20Sch=C3=A4fer?= Date: Thu, 28 Jun 2018 14:29:19 +0200 Subject: [PATCH 1/2] Adding a test that fails --- .../react-navigation/react-navigation-tests.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/types/react-navigation/react-navigation-tests.tsx b/types/react-navigation/react-navigation-tests.tsx index 38aa495240..5bdc0f400c 100644 --- a/types/react-navigation/react-navigation-tests.tsx +++ b/types/react-navigation/react-navigation-tests.tsx @@ -41,6 +41,7 @@ import { NavigationScreenComponent, NavigationContainerComponent, withNavigation, + withNavigationFocus, NavigationInjectedProps, } from 'react-navigation'; @@ -532,3 +533,19 @@ const BackButtonWithNavigation = withNavigation(MyBackButton); const BackButtonInstance = { const backButtonRef = ref; }} />; + +// Test withNavigationFocus + +interface MyFocusedComponentProps { expectsFocus: boolean; } +class MyFocusedComponent extends React.Component { + render() { + return