我在React Native的商店遇到了一些问题。我在我的文件store/index.js中配置了store。我将其导出,然后导入App.js。来自reducer的操作被正确执行,logger在浏览器调试器中显示操作,但有一个问题"function is not defined store.getState().当我在浏览器控制台键入"store.getState()“时,我得到一个问题"store is not defined”。我不知道可能是什么问题:/谢谢你的帮助!
我的文件存储/index.js:
import { createStore, combineRed
在执行LoginScreen.js和connect()之后,尝试通过呈现函数中的道具访问状态属性"confirmResult“时,在MapsStatetoProps组件中出现错误。
Screens\LoginScreen.js
import React, { Component } from "react";
import PhoneInput from "react-native-phone-input";
import { View, StatusBar, Text } from "react-native";
import { Co
我和我的工作团队收到了App团队发来的一条消息,其中包括:
Dear Developer,
We identified one or more issues with a recent delivery for your app, "XXXX" version.
Your delivery was successful, but you may wish to correct the following issues in your next delivery:ITMS-90725: SDK Version Issue - This app update was built
有没有人能够在两次测试之间清除Redux?你干什么了?
我有一个使用Redux的React Native Expo应用程序。
我有一个独立工作的测试,但当我运行所有测试时,它都失败了,因为在redux中有来自其他测试的状态更改。
如何在两次测试之间“刷新”redux存储。
我尝试了mock-redux-store包,但是当我向它传递一个combineReducers()时,它什么也没有返回。
我可以手动重建其中的状态切片,并将它们传递到模拟存储,但这将很难维护。
testing-library-utils.js:
//This file adds a Redux Provider to a c
我正在尝试在现有的React Native项目上设置测试。当我使用Jest运行测试时,测试失败并显示以下错误:
Test suite failed to run
...etc/__app__/node_modules/react-native/Libraries/polyfills/error-guard.js:14
type ErrorHandler = (error: mixed, isFatal: boolean) => void;
^^^^^^^^^^^^
SyntaxError: Unexpected identifier
在将react-native更新到"^0.56.0"之后,我得到了这个错误
bundling failed: Error: Plugin/Preset files are not allowed to export objects, only functions. In /Users/ben/vepo/frontend/node_modules/babel-preset-flow/lib/index.js
我试着做一些类似于这里投票最高的答案,而不是babel-preset-flow:
.babelrc:
"presets": ["react-nat
我有一个反应-本机项目,并希望使用eslint的风格检查。但是,当运行eslint app/命令时,我得到了以下错误:
ESLint couldn't find the plugin "eslint-plugin-jsx-a11y". This can happen for a couple different reasons:
如果ESLint是全局安装的,那么确保eslint-plugin-jx-a11y也是全局安装的。全局安装的ESLint找不到本地安装的插件。
如果ESLint是本地安装的,那么很可能插件没有正确安装。通过运行以下命令尝试
我正在尝试过滤我的数组对象列表,然后尝试使用新的DataSource在ListView中显示。但是,该列表不会被过滤。我知道我的过滤函数工作正常。(我在console.log中检查过了)
我正在使用Redux将我的状态映射到prop。然后试着过滤这个道具。这条路走错了吗?
下面是我的代码:
/*global fetch:false*/
import _ from 'lodash';
import React, { Component } from 'react';
import { ListView, Text as NText } from 'reac
我已经在我的应用程序中使用了react-native-router-flux,并配置了商店,它工作得很棒。
我现在计划在我的应用程序中使用react-NavigationV2.8,我正在努力完成configureStore。
我假设configureStore将按照react-native-router-flux示例的方式使用。下面是我的react-native-router-flux示例中的示例代码。
/* global __DEV__ */
import { Router } from 'react-native-router-flux'; //this is not to
嗨,我一直在尝试从React本地应用程序访问Firestore
我的试用码
import firebase from '@react-native-firebase/app'
import firestore from '@react-native-firebase/firestore';
import * as Actions from '../../../StateManager/Actions/ActionTypes'
export function getVersion() {
return async (dispatch) =