开发者问题收集
每次我将 Amplify 导入到我的 React Native 项目的 App.js 文件中时,都会出现以下错误:TypeError: null is not an object (evaluating 'keys.filter')这是我导入它的方式:我仅使用 Expo 运行该项目。如果我注释掉import Amplify行,则任何其他使用与 Amplify 相关内容的文件都会导致发生相同的错误。
我已经使用 React Native 循环来填充如下所示的选择项 const categorylist = arr.map((data, key) => {if (data != "") {return <Select.Item label={data} value={data} key={data} />;}});我循环并像下面这样使用它,当数组包含非空值时它工作正常,但是当有空值时我收到错
我正在制作一个自定义输入组件const CustomInput = (props) => {console.log(props);return (<TextInput{...props}ref={props.ref}placeholder={props.placeholder}style={{ ...styles.text, ...props.style }}/>);};在我想使用它的文件中,我有
希望你们都一切顺利,我尝试寻找关于我在 ReactJS 中遇到的这个问题的具体答案,我试图映射通过本地系统获取的数组,但控制台中一直出现此错误:TypeError: null is not an object (evaluating 'daysData.map')这是我的代码快照,其中我从获取中初始化数组:这是文本格式:// Here I initalize the array with useS
我不明白为什么会出现此错误TypeError: 无法读取 null 的属性(读取“map”),这是一个非常简单的功能。我希望有人能帮助我。这是我的代码,我无法从 API 请求映射对象。为了保护隐私,我修改了 API 请求的密钥。import { useEffect, useState } from "react";export default function Featured() {const
在过去的 1.5 天左右的时间里,我尝试让 react-native-track-player 工作,但就是无法实现。无论我怎么尝试,我总是遇到相同的错误块:ERROR TypeError: null is not an object (evaluating 'TrackPlayer.RATING_HEART')ERROR Invariant Violation: Module AppRegi
我正在使用 react-native-element-timer (https://www.npmjs.com/package/react-native-element-timer),但 useRef 钩子存在问题。timerRef 的引用是通过渲染“Timer”元素设置的,但我希望计时器在调用函数“Stopwatch”时直接启动,而不是通过onButtonClick 启动。所以我需要在渲染之前引
因此,当用户单击按钮时,我尝试将以下内容更新为 true 或 false。但是它不起作用,一直抛出TypeError: _this.setState is not a function. (In '_this.setState(function (state) {return {icon: !state.icon};})', '_this.setState' is an instance of O
我想显示本地存储的 JSON 文件中 JSON 对象的某些属性。因此,我尝试这样做:import { DistroList as distroList } from '../backend/distroList.json'useEffect(() => {for(let distro in distroList) {if(distroList[distro].Name === distroName
每次我将 RtcEngine 导入我的应用程序时(从“react-native-agora”导入 RtcEngine;),我都会收到以下错误:TypeError: null is not an object (evaluating 'AgoraRtcChannelModule.prefix')at node_modules\react-native\Libraries\LogBox\LogBox.
我正在尝试使用react-native-pdf-lib在我的应用程序中创建 pdf,但是我遇到了这个错误[TypeError: null 不是对象 (正在评估'_reactNativePdfLib.default.getDocumentsDirectory')]我的代码 const page1 = PDFPage.create().setMediaBox(200, 200).drawText('Y
我正在使用 firebase 为 firebase 项目实现 GoogleSign。我安装了以下三个软件包: "@react-native-firebase/app": "^11.3.0","@react-native-firebase/auth": "^11.3.0","@react-native-google-signin/google-signin": "^6.0.0",然后在我的 L
我正在使用 React native 开发移动应用程序,其中涉及与web3.js的交互问题是 RN 不支持核心 Node.js 模块,所以我不得不安装npm i --save react-native-cryptonpm i --save react-native-randombytesreact-native link react-native-randombytesnpm i --save-d
尝试使用 react-native-geolocation-service,并按照提供的设置操作,但仍然出现错误。我使用的是:react-native": "0.63.4,react-native-geolocation-service": "^5.2.0import Geolocation from 'react-native-geolocation-service';Geolocation.g
每当键盘上按下下一个按钮时,我都会尝试将焦点放在下一个输入字段上。从 React Native 文档中,我了解到我们需要使用 useRef 钩子。但是按照文档TypeError:null 不是对象(评估“filed2.current.focus”)我正在使用所有软件包的最新版本,以及带有 TypeScript 模板的新 React Native 应用程序。这是我目前拥有的代码:import Rea