I have created a bare minimum example of the issue below. When I build this in Expo Go, I am able to see the screen that states Navigation working...
but once I build the application in expo dev and submit it to Apple Testflight, I can only see a blank screen.
import 'react-native-gesture-handler'; // required dependency for native-stack
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
const Stack = createNativeStackNavigator();
const MapScreen = () => {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text>Navigation working...</Text>
</View>
);
}
const App = () => {
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
name="stackScreen"
component={MapScreen}
initialParams={{ link: data }}
/>
</Stack.Navigator>
</NavigationContainer>
);
};
export default App;
I was originally using createStackNavigator
but have realised I should be using createNativeStackNavigator
.