react-navigation3.0 版本报错

来源:2-3 StackNavigator精讲-2

慕粉1216303214

2018-11-26

图片描述
import { StackNavigator } from 'react-navigation’
import HomePage from '…/pages/HomePage’
import Page1 from '…/pages/Page1’
import Page2 from '…/pages/Page2’
export const AppStackNavigator = StackNavigator({
HomePage: {
screen: HomePage,
navigationOptions: {
header: null
}
},
Page1: {
screen: Page1
},
Page2: {
screen: Page2
}
})

写回答

1回答

CrazyCodeBoy

2018-11-27

react-navigation3x较之前的版本引入了createAppContainer与第三方组件react-native-gesture-handler具体操作可参考这篇文档哈:

https://reactnavigation.org/blog/2018/11/17/react-navigation-3.0.html


0
1
慕粉1216303214
非常感谢!
2018-11-27
共1条回复

React Native技术精讲与高质量上线App开发

一个真实的上线项目,一次完整的开发过程,全面掌握React Native技术

1577 学习 · 727 问题

查看课程