commit b2b10e636f83c1e5e2a38c1fa24ddb9e7f38784d parent 0086c355e560d119c550a3758b667befa58a53e0 Author: Johan Lindskogen <johan.lindskogen@gmail.com> Date: Mon, 2 Apr 2018 18:29:42 +0200 Correct redux devtools import Diffstat:
M | src/store/index.ts | | | 11 | +++-------- |
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/store/index.ts b/src/store/index.ts @@ -46,12 +46,7 @@ const reducer = combineReducers({ hotlists }); -const middleware = applyMiddleware(thunk); +const composeEnhancers = + (<any>window).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; -const enhancers = compose( - middleware, - (<any>window).__REDUX_DEVTOOLS_EXTENSION__ && - (<any>window).__REDUX_DEVTOOLS_EXTENSION__() -); - -export default createStore(reducer, enhancers); +export default createStore(reducer, composeEnhancers(applyMiddleware(thunk)));