I defined “initialRouteName” in the code, but it does not refer to the default, it correctly displays the screens in the index, and really only when I pass the “login” is the only way it displays it,
Maybe I missed something here?
return (
<NavigationContainer>
<Stack.Navigator initialRouteName="Login" screenOptions={{ headerShown: false }}>
<Stack.Screen name="Login" component={LoginScreen} />
<Stack.Screen name="Index" component={Index} />
</Stack.Navigator>
</NavigationContainer>
);
I downloaded the code in the index file (this file is used as a dashboard)
that the navigation was directly from the “login screen” by an arrow function to the “Home screen”
const handleLogin = () => {
console.log('Login with username and email');
navigation.navigate('Home');
};
```
The function will do anyway, but I tried to check if I have a problem with the index
And still the situation remains the same, he shows me the "Home screen" (only without dashboard)
נאוה תהילה מלכה is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.