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回答
-
react-navigation3x较之前的版本引入了createAppContainer与第三方组件react-native-gesture-handler具体操作可参考这篇文档哈:
https://reactnavigation.org/blog/2018/11/17/react-navigation-3.0.html
012018-11-27
相似问题