robwalkerco / redux-persist-filesystem-storage

Redux persist adaptor for React Native filesystem storage
MIT License
196 stars 71 forks source link

redux-persist failed to create sync storage. falling back to noop storage. #59

Open savithri-lab opened 2 years ago

robwalkerco commented 2 years ago

Hi, do you have any more details about this issue, or any replication steps?

Malik-Usman17 commented 1 year ago

facing the same issue here below is my store.js file code

import { persistStore, persistReducer } from 'redux-persist';
import appReducer from './slices';
import loginSlice from './appSlices/loginSlice';
import thunk from 'redux-thunk';
import FilesystemStorage from "redux-persist-filesystem-storage";

const persistConfig = {
  key: 'root',
  storage: FilesystemStorage
}

let rootReducer = combineReducers({
  appReducers: appReducer
})

let persistedReducer = persistReducer(persistConfig, rootReducer);

const reduxStore = () => {
  let store = configureStore({
    reducer: persistedReducer,
    middleware: [thunk]
  });
  let persistor = persistStore(store);
  return { store, persistor }
}

export default reduxStore;