我正在使用 Firebase 开发我的小型 React 驱动 Web 应用。我设置了 Firebase 配置,并向 Firebase 实时数据库添加了一些数据。我在 Firebase 中的数据设置如下:{"matches" : {"ace34187-c7f2-41e7-a7f2-f097963cddc5" : {"questions" : [ {"answers" : [ {"answer" :
2021-09-12
我是 HTML、CSS 和 JavaScript 的新手。我收到错误,内容为:TypeError: 'undefined' 不是对象。现在我试图查找问题,但没有找到。有人能帮忙吗?控制台中出现错误:item.ClassList.container('active') && handleIndicator(item);var indicator = document.querySelector('.
2021-09-12
我有一个函数将调用 Firebase 和getIdToken函数export const getUserFromDb = async () => {const path = "/user";const firebaseToken = getAuth().currentUser?.getIdToken(); // here need to get itconsole.log(firebaseToke
2021-09-08
使用 Vuelidate vue.js 最新版本的 vue3,使用helpers.forEach方法处理对象数组。我尝试运行表单,但验证导致出现以下错误Gives $response.$errors is undefined in the consoleUncaught (in promise) TypeError: $response.$errors is undefinedexport def
我对一切都还不太熟悉,我一直在摆弄从 GitHub 获得的一些代码,并对其进行修改以加入自己的见解,但我遇到了不少问题,我知道有很多类似的问题,但我对它们很陌生,无法理解他们解决问题的方式,我真的需要一些帮助...最好能为初学者解释一下。谢谢,Lachie。import React from "react";import { StyleSheet, Button, Text, TextInput,
2021-09-02
以下代码从 Atlassian Storage API 中查询一条记录。使用console.log(data)将记录显示为对象。使用console.log(data.first_name) 和 console.log(data.last_name),我可以在控制台中成功看到名称Lucy和Carrots。这是我的问题:当我尝试循环遍历其他对象以按照以下代码显示记录时。它显示错误TypeError:无
2021-09-01
我有一个名为setSTNo的函数,但未被调用。我尝试了很多次,但无法找出错误。需要助手..codeconst onRefresh = React.useCallback(async() => {setserviceTData([])fetch(`${API_URL}/v1/serviceTicket`, {method: 'GET',headers: {Accept: 'application/
2021-08-31
我尝试使用地图遍历一个对象,但在网站和控制台上都出现此错误:TypeError: Cannot read property 'map' of undefined我尝试仅显示城市的 countryName 和人口,但地图似乎不起作用。我从 geoAPI 获取 json,返回以下内容:{"totalResultsCount":12132606,"geonames":[{"adminCode1":"01
2021-08-30
我的组件必须渲染一个对象来填充内容。当我在 Vue 项目中工作时,我可以毫无问题地传递此对象<my-compnent :card="card"></my-component>但是当我尝试使用构建的组件时,它不会将“MyCard”读取为对象,而是读取为字符串...请帮帮我我尝试使用与 vue 相同的方式,使用 :card 但它不起作用,如果我只使用 card="card" 它可以访问组件但没有对象我
2021-08-30
我正在用 React 开发天气应用程序。这是学习项目。我遇到了错误。我使用了 3 个组件。App.js:<WeatherApiAddressProvider><WeatherCity /></WeatherApiAddressProvider>WeatherApiAddressProvider(Context API):const setApiAddress = (city) => {const
2021-08-29
当我按下按钮时,我需要导航到我的主屏幕。但我收到错误=>TypeError:未定义不是对象(评估“navigation.navigate”)我的代码import React, { Component, useEffect } from 'react'import { Card } from 'react-native-elements'import AsyncStorage from '@rea
2021-08-24
当我将 props 从我的登录组件传递到通知组件时,我得到了 TypeError: undefined 不是对象(评估'route.params')这是 Login.jsexport const Login = ({navigation}) => {const [username, onChangeUsername] = React.useState("");const [password, on
2021-08-20
首先,抱歉标题太令人困惑了。我找不到更清楚的表达方式。最近,我正在做自己的项目,遇到了一个问题。如果你能给我一些建议,那对我来说将是一个巨大的帮助。所以,这是我的状态const[state, setState] = useState({externalEvents: [{ title: "Art 1", color: "#0097a7", id: 34432, custom: "fdsfdsfds
2021-08-17
我得到两个对象,其中有一些空格不匹配。当我在 for..of 中使用两个替换函数时,它会报告错误。如果我只使用一个替换,它会起作用。但对象不匹配我的代码在这里:const jsonText = await tableFlyoutPanel.json.textJsonContent();const rowContent = await alarmTable.rowContentWithHeaders
2021-08-14
我是 React 的新手,我正在开发一个小项目,该项目使用搜索栏来查找从数据库中获取的数据。我尝试的代码如下:function Posts() {const [notes, setNotes] = useState([]);useEffect(()=>{getAllNotes();}, []);const getAllNotes = async () => {await axios.get(`/b
2021-08-12