| 1234567891011121314151617 |
- import { createStore, applyMiddleware, compose, combineReducers } from 'redux';
- import thunk from 'redux-thunk';
- import { createLogger } from 'redux-logger';
- import sharedReducers from 'app/core/reducers';
- import alertingReducers from 'app/features/alerting/state/reducers';
- const rootReducer = combineReducers({
- ...sharedReducers,
- ...alertingReducers,
- });
- export let store;
- export function configureStore() {
- const composeEnhancers = (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
- store = createStore(rootReducer, {}, composeEnhancers(applyMiddleware(thunk, createLogger())));
- }
|