1

I've recently setup my react native app to use redux-devtools-extension and now am trying to figure out how to apply stack tracing. Currently my store is written as so:

import reduxThunk from 'redux-thunk';

const persistedReducer = persistReducer(persistConfig, reducers);

const store = createStore(
  persistedReducer,
  composeWithDevTools(applyMiddleware(reduxThunk)),
);

I basically want to apply the following options so I can see where actions are called from:

{
  trace: true, 
  traceLimit: 25,
}

Given the above, how can I retrofit my current setup?

Carl Edwards
  • 13,826
  • 11
  • 57
  • 119

1 Answers1

4

The documentation explains here. I think the file should look like this.

import reduxThunk from 'redux-thunk';

const persistedReducer = persistReducer(persistConfig, reducers);
const composeEnhancers = composeWithDevTools({ trace: true, traceLimit: 25});

const store = createStore(
  persistedReducer,
  composeEnhancers(applyMiddleware(reduxThunk)),
);
1t1e1
  • 306
  • 2
  • 6