made with esnextbin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createStore, applyMiddleware, compose } from 'redux'; | |
// import { persistState } from 'redux-devtools'; | |
import rootReducer from '../reducers'; | |
import DevTools from '../containers/DevTools'; | |
export default function configureStore(initialState) { | |
const finalCreateStore = compose( | |
DevTools.instrument(), | |
// persistState(window.location.href.match(/[?&]debug_session=([^&]+)\b/)) | |
)(createStore); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function requireAll(requireContext) { | |
return requireContext.keys().reduce((previous, current) => { | |
const name = current.substring(current.lastIndexOf('/') + 1, current.lastIndexOf('.')); | |
previous[name] = requireContext(current); | |
return previous; | |
}, {}); | |
} | |
const actionCreators = requireAll(require.context('../actions', true, /^\.\/.*\.js$/)); |