After installing and customizing my basic react navigation setup, After building the app a blank screen appears with no errors in the console.
I added {{flex:1}} to the SafeAreaView
I tried uninstalling, deleting node modules, gradle clean and nothing is working.
Navigation.js file
import *as React from "react";
import IndexScreen from "./Screens/Index";
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { NavigationContainer } from '@react-navigation/native';
import { SafeAreaView } from "react-native-safe-area-context";
const Stack = createNativeStackNavigator();
const Navigation = () => {
<SafeAreaView style={{flex:1}}>
<NavigationContainer>
<Stack.Navigator initialRouteName="Index">
<Stack.Screen name="Index" component={IndexScreen} />
</Stack.Navigator>
</NavigationContainer>
</SafeAreaView>
}
export default Navigation;
App.js file
import React from 'react';
import Navigation from './src/Navigation';
const App = () =>{
return (
<Navigation />
)}
export default App;