showing results for - "redux devtools with middleware"
Isabell
13 Jan 2020
1import { applyMiddleware, compose, createStore } from "redux";
2import thunk from "redux-thunk";
3import rootReducer from "./rootReducer";
4
5// for this we'll use Redux "compose" function
6const enhancers = compose(
7  applyMiddleware(thunk), // your own middleware
8  window.devToolsExtension ? window.__REDUX_DEVTOOLS_EXTENSION__() : (f) => f
9);// devtools middleware
10
11export const store = createStore(rootReducer, enhancers);
12