Skip to content
This repository was archived by the owner on Jul 7, 2021. It is now read-only.

Commit cb7dcb4

Browse files
committed
integrate redux dev tools in store file
1 parent 45d5f40 commit cb7dcb4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/store.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createStore, applyMiddleware } from "redux";
1+
import { createStore, applyMiddleware, compose } from "redux";
22
import thunk from "redux-thunk";
33
import rootReducer from "./reducers";
44

@@ -7,6 +7,9 @@ const middleware = [thunk];
77
const store = createStore(
88
rootReducer,
99
initialState,
10-
applyMiddleware(...middleware)
10+
compose(
11+
applyMiddleware(...middleware),
12+
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
13+
)
1114
);
1215
export default store;

0 commit comments

Comments
 (0)