when update the expo from (16.0.0) to (24.0.0) and react navigation from (git+https://github.com/react-community/react-navigation.git) to (^1.0.0-beta.21) version, this error occured
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Finally found out how to solve this, its an undocumented DrawerNavigatorConfig:
drawerOpenRoute: 'DrawerOpen',
drawerCloseRoute: 'DrawerClose',
drawerToggleRoute: 'DrawerToggle'
Look here: https://github.com/react-community/react-navigation/issues/3148#issuecomment-352778884
回答2:
remove ^ from package json before react-nativetion package
it should be look like this "react-navigation": "1.0.0-beta.20"
not "react-navigation": "^1.0.0-beta.20" (^ means you are allowing npm install to the install latest version which is the cause of the problem )
after removing ^ you have to delete your node_module and then Run npm install this will install correct packages for your current project
回答3:
Simply, change to "react-navigation": "1.0.0-beta.26" from "react-navigation": "1.0.0-beta.20"