feat: add helper and hook for container ref

This commit is contained in:
Satyajit Sahoo
2021-05-01 23:51:10 +02:00
parent def7c03d7d
commit 0ecd112ec9
17 changed files with 179 additions and 95 deletions

View File

@@ -28,7 +28,7 @@ import {
DefaultTheme,
DarkTheme,
PathConfigMap,
NavigationContainerRef,
useNavigationContainerRef,
} from '@react-navigation/native';
import { createDrawerNavigator } from '@react-navigation/drawer';
import {
@@ -193,7 +193,7 @@ export default function App() {
return () => Dimensions.removeEventListener('change', onDimensionsChange);
}, []);
const navigationRef = React.useRef<NavigationContainerRef>(null);
const navigationRef = useNavigationContainerRef<RootStackParamList>();
useReduxDevToolsExtension(navigationRef);