因此,我有一个简单的 React Native 应用,它是使用 Expo 创建的,并在我的个人 Android 设备上进行调试。我已将 firebase/firestore 包含到我的应用中,现在正尝试在单击按钮时向 firestore 添加一个对象。这是我的代码:firebaseConfig.js :import { initializeApp } from '@firebase/app';va
2021-11-08
我的应用程序运行正常,但当我从 git 存储库提取数据时,出现了此错误。我不明白为什么会出现此错误。请帮助消除此错误并向我解释此错误。错误为 TypeError:undefined 不是对象(评估“_core.pathUtils.urlToPathAndParams”)
2020-01-20
我正在编写产品详细信息,但无法使用 params 属性无法读取未定义的属性“params”您可以在此处查看我的代码import React from 'react';import {Image, Text, View} from 'react-native';const ProductDetail = ({route, navigation}) => {const productID = rout
2023-01-18
我正在将'react-navigation'的 DrawerNavigator 集成到我的项目中,作为此文档。但是当我运行项目时,单击按钮时总是出现此错误:TypeError: undefined is not an object (evaluating'this.props.navigation.navigate')当我从左向右滑动时,什么也没有发生,没有打开抽屉。我检查了this.props,
2017-12-16
我有以下 React-Navigator 配置:export default class App extends React.Component {render() {const MainNavigator = StackNavigator({signin: { screen: SigninScreen },signup: { screen: SignupScreen },home: {scree
2017-12-29
import React, { Component } from 'react';import { AppRegistry, StyleSheet, TextInput, View, Alert, Button, Text} from 'react-native';import { StackNavigator } from 'react-navigation';export default cl
2018-03-13
我有一个像这样的自定义标题import React from 'react';import { View, TouchableOpacity, Text, StyleSheet, Image } from 'react-native';import { Header, Left, Right, } from 'native-base';import { Icon } from 'react-nat
2018-05-31
现在这个导航让我头疼,我看了几个关于这个的视频,并按照它们做,但仍然遇到同样的错误,即 this.props.navigation.navigate 未定义不是对象错误这里基本上是我的代码App.jsimport React from 'react';import { Container, Body, Header, Title, Content, List, ListItem, Text, Le
2018-08-17
我有两个屏幕,我想通过单击使用 React 导航移动新屏幕。但是我收到错误this.props.navigation.navigate这是我的代码。任何人都知道问题是什么。我遵循每一步。 import React, {Component} from 'react';import { AppRegistry, View, Text,StyleSheet, TextInput, Image, S
2019-04-12
我是 React Native 的新手。我想创建简单的抽屉导航,但这里出现错误。我已经安装了 React 导航。这是代码:import React, { Component } from 'react';import {StyleSheet,Text,View,StatusBar ,TouchableOpacity} from 'react-native';import { DrawerNavig
2019-09-11
我知道这是重复的问题,我尝试了 3-4 天的所有解决方案来解决它,但不明白为什么它会一次又一次地出现。我想我犯了一个愚蠢的错误,请帮我找出它。以下是我的登录和忘记密码屏幕的代码。在登录屏幕上,当我单击“忘记密码”按钮时,它会抛出TypeError:未定义不是对象(评估“this.props.navigation.navigate”)// config/routes.jsimport * as Re
我搜索并将其与正确的解决方案进行比较,看起来没有什么问题,但我几乎得到了下面显示的错误屏幕;这里的导航代码有什么问题;import React, { Component } from 'react';import {AppRegistry,StyleSheet,Text,View,TouchableOpacity} from 'react-native';import { StackNavigat
2017-08-12
我在代码中使用 props 来显示项目,但单击后无法导航到任何其他屏幕。我还将其定义为const { navigation } = this.props.navigation;,但显示错误,如屏幕截图所示。这是我的代码。此代码位于同一个Indprotype.js文件中(未使用两个单独的 .js 文件) class Withwish extends React.Component {ProPres
2018-01-30
我正在学习在屏幕之间移动的教程。我来到 HomeScreen.js 文件,在导航时出现红色错误。当我将鼠标悬停在导航上时,我收到错误[ts] Property 'navigation' does not exist on type 'Readonly<{ children?: ReactNode; }> & Readonly<{}>'.any当我将鼠标悬停在“react-navigation”上时
2018-08-27
我正在开发一个 react-native 应用,目前有两个屏幕可通过底部的选项卡访问。我想在按下时导航到特定屏幕,并尝试触发从一个屏幕到下一个屏幕的导航。为此,我似乎需要将一个 prop 传递给屏幕并按如下方式访问它:const {navigate} = this.props.navigation;然后执行:onPress={() => navigate('Result', {result: re
2018-12-31