gxsshallot / react-native-pure-navigation-bar

A fully customizable navigation bar in React Native.
MIT License
96 stars 19 forks source link

报错,在react-navigation3中需要直接创建容器 #11

Closed lypeng29 closed 5 years ago

lypeng29 commented 5 years ago

运行示例文件报错:“In react-navigation 3 you must set up your app container directly. More info:https://reactnavigation.org/docs/en/app-containers.html

解决: 文件头部导入: import { createStackNavigator, createAppContainer } from 'react-navigation'; 修改文件末尾: const AppContainer = createAppContainer(navigator); AppRegistry.registerComponent('test', () => AppContainer);

gxsshallot commented 5 years ago

@lypeng29 你说的是example工程么?我看了下,里面的package.json的依赖是react-navigation v2的~

lypeng29 commented 5 years ago

哦哦,那你关闭吧,我采用默认装的是v3~