我试图构建一个应用程序,其中包含4个按钮,其中每个按钮将导致一个新的屏幕,但每当我试图点击任何按钮,它显示undefined is not an object (evaluating '_this2.props.navigation.navigate当我单击flood按钮时,它应该导航到洪流页面,其中只显示文本flood。我是新的反应本机,任何想要写干净和模块化的代码。什么应该是一个很好的目录结构?目录结构- 错误- import { Text
我读过,使用createStackNavigator作为组件类是可能的,我试图实现这一点,但我总是遇到一个错误。In react-navigation 3 you must set up your app container directly.More info: https://reactnavigation.org/docs/en/app-containers.htmlreturn <Stack
我正在构建我的第一个react原生应用程序,并且我已经成功地创建了我的登录屏幕和登录表单组件(以及我想要导航到的空白闪屏Splash.js )。我刚刚成功地安装了react-navigation, react-navigation-stack and react-native-gesture-handler,但是我刚刚在我的App.js文件上导入了导航,现在我的登
这是一个非常简单的页面,它试图使用下面的Redux....see代码。但是,我得到了错误object is not a constructor (evaluating 'new ctor(props context)')import {Text, View} from 'react-native';
import {connect} from