{"size": 888, "ext": "js", "max_stars_repo_path": "src/redux/store/store.js", "max_stars_repo_name": "zhf1206/react-redux-template", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/redux/store/store.js", "max_issues_repo_name": "zhf1206/react-redux-template", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/redux/store/store.js", "max_forks_repo_name": "zhf1206/react-redux-template", "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": 31.7142857143, "max_line_length": 133, "alphanum_fraction": 0.7083333333}
import {createStore, combineReducers, applyMiddleware, compose} from 'redux';
import { createLogger } from 'redux-logger'
import thunk from 'redux-thunk';
import * as home from '../reducers/home';
import * as login from '../reducers/login';

const loggerMiddleware = createLogger();

// let store = createStore(
//   combineReducers({...home,...login}),
//   applyMiddleware(thunk)
// );

let store;
if(!(window.__REDUX_DEVTOOLS_EXTENSION__ || window.__REDUX_DEVTOOLS_EXTENSION__)){
    store = createStore(
        combineReducers({...home,...login}),
        applyMiddleware(thunk)
    );
}else{
    store = createStore(
        combineReducers({...home,...login}),
        compose(applyMiddleware(thunk,loggerMiddleware),window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__())
    );
}

export default store;
// export const history = syncHistoryWithStore(store);