text: 'use strict';
  
  
  import { applyMiddleware, createStore } from 'redux';
  import thunk from 'redux-thunk';
  import { persistStore, autoRehydrate } from 'redux-persist';
  import { AsyncStorage } from 'react-native';
  import reducers from '../reducers/index';
  
  const logger = store => next => action => {
  	if(typeof action === 'function') console.log('dispatching a function');
  	else console.log('dispatching', action);
  	let result = next(action);
  	console.log('next state', store.getState());
  	return result;
  }
  
  let middlewares = [
  	// logger,
  	thunk
  ];
  
  
  
  export default  () => {
  	const store = createStore(
  		reducers,
  		applyMiddleware(thunk,logger)
  	  );
  	return store;
  }
  
  
  