我在使用本机反应在屏幕之间导航时遇到问题。这是我的堆栈导航器
Login: {
screen: Login
},
Home: {
screen: Home,
nestedScreen: LoginForm,
},
LoginForm: {
screen: LoginForm
},
我的登录页面就是这样
<View style={styles.formContainer}>
<LoginForm />
</View>
现在如何从登录表单文件中使用导航器。我用过,但是导致“来自JS的格式错误的调用:字段大小不同”
答案 0 :(得分:0)
您是否尝试过以下代码:
Login: {
screen: LoginScreen,
},
SetPassword: {
screen: SetPasswordScreen,
},
mainFlow: {
screen: TabNavigator(
{
overviewFlow: {
screen: StackNavigator(
{
Overview: {
screen: OverviewScreen,
},
DietitianInfo: {
screen: DietitianInfoScreen,
},
},
{
headerMode: 'none',
}
)
},
Goals: {
screen: GoalsScreen,
},
diaryFlow: {
screen: StackNavigator(
{
DiaryOverview: {
screen: DiaryOverviewScreen,
},
DiaryEntry: {
screen: DiaryEntryScreen,
},
},
{
headerMode: 'none',
}
)
},
Notes: {
screen: NotesScreen,
},
},
{
tabBarPosition: 'bottom',
navigationOptions: ({ navigation }) => ({
// ...
}),
tabBarOptions: {
// ...
},
}
)
}
},