我一直试图使用redux将我的redux状态保存到AsyncStorage。尽管我一直有一个错误:
_this.store.getState is not a function
我不知道为什么会这样?
这是我的设置:
configureStore.js:
import {AsyncStorage,} from 'react-native';
import { createStore, applyMiddleware, compose, combineReducers, } from 'redux';
import reduxThunkMiddleware fro
当将AsyncStorage作为存储引擎传递时,我得到以下错误:
WARN Possible Unhandled Promise Rejection (id: 0):
Error: [AsyncStorage] Passing null/undefined as value is not supported. If you want to remove value, Use .removeItem method instead.
Passed value: undefined
Passed key: [EasyPeasyStore][0]
这是我的商店声明:
import { action,
我使用的是redux-持久化5.5.0当我调试我的本机应用程序时,错误地说"autoRehydrate不是一个函数“我这里的源代码,请给我帮助
"use strict";
import thunk from "redux-thunk";
import analytics from "./analytics";
import array from "./array";
import promise from "./promise";
import reducers from "../reducers
我刚刚开始使用Redux持久化,由于某些原因,我无法让它工作。(无法读取未定义错误的属性“订阅”)
Persistor.js
import { createStore } from 'redux'
import { persistStore, persistReducer } from 'redux-persist'
import store from 'redux-persist/es/storage/session' // defaults to
localStorage for web and AsyncStorage for react
我使用back4app作为后端服务来部署我的应用程序,它是在中开发的。我正在测试如何使用back4app的“云代码函数”.
由于我是back4app的初学者,我在使用他们的指南时发现了一个问题。我面临这样的消息错误:'async functions' is only available in ES8 (use 'esversion: 8').
Back4app侧:
import Parse from 'parse/react-native.js';
import AsyncStorage from '@react-native-async
我的React组件将用户的设置存储在AsyncStorage中,并加载get的设置。存储和获取数据运行良好,但存在一个问题,即组件在从异步函数获取值之前呈现。如何解决这个问题?这是我的代码:
import React from 'react';
import { View } from 'react-native';
import AsyncStorage from '@react-native-community/async-storage';
import { Media } from '../constants';
cla
我在React Native Expo上有这样的警告:AsyncStorage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-async-storage/async-storage' instead of 'react-native'. See https://github.com/react-native-async-storag