react-native - undefined 不是对象(评估 route.routeName)

标签 react-native react-navigation

enter image description here 当将 expo 从 (16.0.0) 更新到 (24.0.0) 并将导航从 (git+ https://github.com/react-community/react-navigation.git ) 响应到 (^1.0.0-beta.21) 版本时,发生此错误

最佳答案

终于找到了解决这个问题的方法,它是一个未记录的 DrawerNavigatorConfig:

drawerOpenRoute: 'DrawerOpen',
drawerCloseRoute: 'DrawerClose',
drawerToggleRoute: 'DrawerToggle'

看这里: https://github.com/react-community/react-navigation/issues/3148#issuecomment-352778884

关于react-native - undefined 不是对象(评估 route.routeName),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47886782/

相关文章:

javascript - 如何以不同的可见性百分比检查 FlatList 中项目的可见性?

react-native - TabNavigator中的“阻止/禁用”选项卡- react 导航

react-native - react-navigation TabNavigator 仅呈现第一个选项卡

node.js - 如何检测模块中的 React Native 打包器?

reactjs - 过滤数据时 react 输入字段将失去焦点

javascript - React Native 选项卡导航显示问题

ios - react 导航重置操作不起作用

typescript - 如何使用 NavigationHelpersCommon 类型检查 ReactNavigation 的导航?

javascript - 在 React Native 中渲染 2 个列表

javascript - React Native 收到此错误 'Unrecognized operator abs'