Я получаю следующую ошибку только на устройстве Android. Все отлично работает на симуляторах Android и iOs. Любая идея, что мне нужно сделать, чтобы это работало на устройстве? Я использую React Navigation v5.
Ошибка:
The action 'NAVIGATE' with payload '{"name": "NewConversation"}' was not handled by any navigator...
Код навигации:
const AppStack = createStackNavigator();
const MainStack = createStackNavigator();
const MainStackScreen = () => {
const { t } = useTranslation();
return (
<MainStack.Navigator
screenOptions={defaultOptions}
initialRouteName="Conversations"
>
<MainStack.Screen name="Conversations" options={{title: t('screens.conversationsList.title')}} component={ConversationsList} />
<MainStack.Screen name="ViewConversation" options={{ title: 'View Conversation'}} component={ViewConversation} />
<MainStack.Screen name="MainSettings" options={{ title: t('screens.settings.title')}} component={MainSettings} />
<MainStack.Screen name="DeviceManagement" options={{ title: t('screens.deviceManagement.title')}} component={DeviceManagement} />
</MainStack.Navigator>
);
};
const AppNavigator = () => {
const { t } = useTranslation();
return (
<AppStack.Navigator
mode="modal"
screenOptions={defaultOptions}
>
<AppStack.Screen name="Main" component={MainStackScreen} options={{ headerShown: false }} />
<AppStack.Screen name="NewConversation" options={{ title: t('screens.newConversation.title')}} component={NewConversation} />
</AppStack.Navigator>
);
};
export default AppNavigator;