Skip to content

Commit b971340

Browse files
committed
Turn on Redux action stack traces in the dev tools
1 parent 2ad442e commit b971340

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/configureStore.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,16 @@ export function configureStore(options = {}) {
4545

4646
const middlewareEnhancer = applyMiddleware(...middleware)
4747

48-
const storeEnhancers = [middlewareEnhancer, ...enhancers]
48+
let finalCompose = compose
49+
50+
if(devTools) {
51+
finalCompose = composeWithDevTools({
52+
// Enable capture of stack traces for dispatched Redux actions
53+
trace : !IS_PRODUCTION
54+
})
55+
}
4956

50-
let finalCompose = devTools ? composeWithDevTools : compose
57+
const storeEnhancers = [middlewareEnhancer, ...enhancers]
5158

5259
const composedEnhancer = finalCompose(...storeEnhancers)
5360

0 commit comments

Comments
 (0)