{"size": 767, "ext": "js", "max_stars_repo_path": "store.js", "max_stars_repo_name": "Robert-Fish/wookiepedia", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "store.js", "max_issues_repo_name": "Robert-Fish/wookiepedia", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "store.js", "max_forks_repo_name": "Robert-Fish/wookiepedia", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.4482758621, "max_line_length": 77, "alphanum_fraction": 0.7757496741}
import {createStore, combineReducers, compose, applyMiddleware} from 'redux';
import peopleReducer from './reducers/peopleReducer';
import createSagaMiddleware from 'redux-saga';
import rootSaga from './sagas';
import speciesReducer from './reducers/speciesReducer';

const rootReducer = combineReducers({
  people: peopleReducer,
  species: speciesReducer,
});

const sagaMiddleware = createSagaMiddleware();

const composeSetup =
  process.env.NODE_ENV !== 'production' &&
  typeof window === 'object' &&
  window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
    ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
    : compose;

const store = createStore(
  rootReducer,
  composeSetup(applyMiddleware(sagaMiddleware)),
);

sagaMiddleware.run(rootSaga);

export default store;
