import {createStore, applyMiddleware} from 'redux'
import {persistStore, persistReducer} from 'redux-persist'
import thunk from 'redux-thunk'
import { composeWithDevTools } from 'redux-devtools-extension'
import AsyncStorage from '@react-native-community/async-storage'
import {createStore, applyMiddleware} from 'redux' import {persistStore, persistReducer} from 'redux-persist' import thunk from 'redux-thunk' import { composeWithDevTools } from 'redux-devtools-extension' import AsyncStorage from '@react-native-community/async-storage'
import rootReducer from './reducers'
const persistConfig = { key: 'root', storage: AsyncStorage, whitelist: ['user'] } const persistedReducer = persistReducer(persistConfig, rootReducer) export const store = createStore( persistedReducer, composeWithDevTools(applyMiddleware(thunk)) ) export const persistor = persistStore(store)