Я использую библиотеку redux-persist, но данные хранятся только в браузере и не сохраняются на android моб.
Мой магазин:
import {
configureStore,
combineReducers,
} from '@reduxjs/toolkit';
import { AsyncStorage } from 'react-native';
import logger from 'redux-logger';
import thunk from 'redux-thunk';
import {
persistReducer,
persistStore,
} from 'redux-persist';
import { authReducer, newsReducer } from '../features';
const rootReducer = combineReducers({
authReducer,
newsReducer,
});
const persistConfig = {
key: 'root',
storage: AsyncStorage,
};
const persistReducers = persistReducer(persistConfig, rootReducer);
const store = configureStore({
reducer: persistReducers,
middleware: [thunk, logger],
});
export const persistor = persistStore(store);
export default store;
Как можно Я решаю эту проблему?