handle when no one has redux devtools
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
import { createStore, applyMiddleware, compose } from "redux";
|
||||
import thunk from "redux-thunk";
|
||||
import rootReducer from "../reducers/main.js";
|
||||
const devTools = window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__();
|
||||
|
||||
export default function setupStore() {
|
||||
return createStore(
|
||||
rootReducer,
|
||||
compose(
|
||||
applyMiddleware(thunk),
|
||||
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
|
||||
(devTools || function(f) { return f; })
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user