mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 23:00:30 +00:00
314daf155e
* Added an UNSET sync mode * Fixed tests * Remove sync logs and adjusted dropdown * Fixed duplication kve bug * Added sync config modal * AUtobind * Autobind working * Hot loading works again * Remove express * Fixed tests * Fix one thing * Fixed some hmr-related bugs
22 lines
566 B
JavaScript
22 lines
566 B
JavaScript
import {createStore, applyMiddleware} from 'redux';
|
|
import thunkMiddleware from 'redux-thunk';
|
|
import {reducer} from './modules';
|
|
|
|
export default function configureStore () {
|
|
const middleware = [thunkMiddleware];
|
|
|
|
if (__DEV__) {
|
|
// const createLogger = require('redux-logger');
|
|
// middleware.push(createLogger({collapsed: true}));
|
|
}
|
|
|
|
const store = createStore(reducer, applyMiddleware(...middleware));
|
|
if (__DEV__ && module.hot) {
|
|
module.hot.accept('./modules/index', () => {
|
|
store.replaceReducer(reducer);
|
|
});
|
|
}
|
|
|
|
return store;
|
|
}
|