Initial commit
This commit is contained in:
16
client/src/configureStore.js
Normal file
16
client/src/configureStore.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import { createStore, applyMiddleware, compose } from 'redux';
|
||||
import thunk from 'redux-thunk';
|
||||
|
||||
const middlewares = [
|
||||
thunk,
|
||||
];
|
||||
|
||||
export default function configureStore(reducer, initialState) {
|
||||
/* eslint-disable no-underscore-dangle */
|
||||
const store = createStore(reducer, initialState, compose(
|
||||
applyMiddleware(...middlewares),
|
||||
window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__() : f => f,
|
||||
));
|
||||
/* eslint-enable */
|
||||
return store;
|
||||
}
|
||||
Reference in New Issue
Block a user