{"size": 624, "ext": "js", "max_stars_repo_path": "app/store/index.js", "max_stars_repo_name": "dai1254473705/bx", "max_stars_repo_stars_event_min_datetime": "2018-04-22T01:10:14.000Z", "max_stars_repo_stars_event_max_datetime": "2018-04-22T01:10:14.000Z", "max_issues_repo_path": "app/store/index.js", "max_issues_repo_name": "dai1254473705/bx", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/store/index.js", "max_forks_repo_name": "dai1254473705/bx", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.2857142857, "max_line_length": 79, "alphanum_fraction": 0.7371794872}
/*!
 *
 * redux
 */

/*
 * import store
 */
import { createStore,applyMiddleware } from 'redux';
import createSagaMiddleware, { END } from 'redux-saga';
import reducer from './reducer/index';

const middlewares = [];
const sagaMiddleware = createSagaMiddleware();

middlewares.push(sagaMiddleware);

const createStoreWithMiddleware = applyMiddleware(...middlewares)(createStore);

export default function configureStore(initialState) {
  const store = createStoreWithMiddleware(reducer, initialState);
  // install saga run
  store.runSaga = sagaMiddleware.run;
  store.close = () => store.dispatch(END);

  return store;
}
