mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
e9d64ebb23
* Got a hacky workspace implementation running * Removed some hax with reducer composition * Moved some more around * Moved files back out * Started on entities reducer * Split up some components * Moved nested modules back out of workspaces * Started on new Sidebar tree stuff * Better store stuff * Some more tweaks * Removed workspace update action * Re-implemented filtering in the Sidbare * Switch to get the newest response
25 lines
577 B
JavaScript
25 lines
577 B
JavaScript
import {createStore, applyMiddleware} from 'redux'
|
|
import thunkMiddleware from 'redux-thunk'
|
|
import createLogger from 'redux-logger'
|
|
import rootReducer from './reducer'
|
|
|
|
export default function configureStore (initialState) {
|
|
const store = createStore(
|
|
rootReducer,
|
|
initialState,
|
|
applyMiddleware(
|
|
thunkMiddleware,
|
|
createLogger({collapsed: true})
|
|
)
|
|
);
|
|
|
|
if (module.hot) {
|
|
module.hot.accept('./reducer', () => {
|
|
const nextReducer = require('./reducer.js').default;
|
|
store.replaceReducer(nextReducer);
|
|
})
|
|
}
|
|
|
|
return store;
|
|
}
|