text: import { applyMiddleware, createStore } from 'redux';
  import { persistReducer, persistStore } from 'redux-persist';
  import createSagaMiddleware from 'redux-saga';
  import AsyncStorage from '@react-native-async-storage/async-storage';
  import rootReducer from '../reducers';
  import IndexSaga from '../sagas';
  
  const sagaMiddleware = createSagaMiddleware();
  
  const persistConfig = {
      key: 'root',
      storage: AsyncStorage,
  };
  
  const persistedReducer = persistReducer(persistConfig, rootReducer);
  let store = createStore(persistedReducer, applyMiddleware(sagaMiddleware));
  sagaMiddleware.run(IndexSaga);
  
  let persistor = persistStore(store);
  
  export { store, persistor };
  