text: import { createStore, applyMiddleware, compose } from 'redux';
  import thunkMiddleware from 'redux-thunk';
  import rootReducer from '../reducers/rootReducer';
  
  import { persistStore, persistReducer } from 'redux-persist';
  import storage from 'redux-persist/lib/storage'; // defaults to localStorage for web and AsyncStorage for react-native
  
  const persistConfig = {
    key: 'root',
    storage
  };
  
  const persistedReducer = persistReducer(persistConfig, rootReducer);
  
  // Redux DevTools
  const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
  
  export const store = createStore(
    persistedReducer,
    composeEnhancers(applyMiddleware(thunkMiddleware))
  );
  
  export const persistor = persistStore(store);
  