我在initialRouteName上收到错误:'Notifications' property,
和我尝试了几种解决方案,但都没有成功。我是React Native的新手,我希望得到任何帮助。
const NotificationStackNavigator = createStackNavigator(
{
Notifications:{ //PAGE: To-Do => List Of Leave
screen: Notification,
navigationOptions:{
title: 'Notifications'
}
},
//#region Leave Application
AllApprovalInToDo: { //PAGE: To-Do => All List Of Leave
screen: AllApprovalInToDo,
navigationOptions: {
title: 'Approval Leave Request',
headerBackTitle: 'Back',
headerStyle:{
backgroundColor: Blue,
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'normal'
}
}
},
ApprovalItem: { //PAGE: To-Do => Leave Detail
screen: ApprovalItem,
},
LeaveApprovalToDoFilter: { //PAGE: To-Do => Leave Filter
screen: PendingLeaveApprovalFilter
},
//#endregion Leave Application
//#region Overtime
OvertimeApprovalDetail: { //PAGE: To-Do => Overtime Detail
screen: OvertimeApprovalDetail
},
OvertimeAllApproval: { //PAGE: To-Do => All List of Overtime
screen: OvertimeAllApproval
},
OvertimeApprovalFilter: { //PAGE: To-Do => Overtime Filter Page
screen: OvertimeApprovalFilter
}
//#endregion Overtime
},
{
initialRouteName: 'Notifications',
},
);
Screenshot of problem
当我尝试将React Native代码从0.59.10版本转换到0.72.5版本时,我收到了错误initialRouteName:通知我该怎么办?
1条答案
按热度按时间laximzn51#
在这里,您可以创建一个导航器。你也需要更新你的react-navigation到最新版本。