import { createStore , combineReducers , applyMiddleware , compose } from 'redux' ; import { connectRouter , routerMiddleware } from 'connected-react-router' ; import { createHashHistory } from 'history' ; import thunk from 'redux-thunk' ; import SnackBarMessageStore from './SnackBarMessageStore' ; import UserInfoStore from './UserInfoStore' ; import AppProcessesStore from './AppProcessesStore' ; import SideBarNavigationStore from './SideBarNavigationStore' ; import ApplicationStore from './applications/applicationStore' ; import MultitaskStore from './MultitaskStore' ; export const history = createHashHistory ( ) ; const composeEnhancers = window . __REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose ; const createRootReducers = ( history ) => combineReducers ( { router : connectRouter ( history ) , SnackBarMessageStore , UserInfoStore , AppProcessesStore , SideBarNavigationStore , ApplicationStore , MultitaskStore , } ) ; const store = createStore ( createRootReducers ( history ) , composeEnhancers ( applyMiddleware ( thunk , routerMiddleware ( history ) ) ) ) ; export default store ;