Skip to content

Commit 64717bb

Browse files
committed
Implement tracing in the examples
1 parent af37aa3 commit 64717bb

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

Diff for: examples/counter/store/configureStore.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import * as actionCreators from '../actions/counter';
77

88
export let isMonitorAction;
99
export default function configureStore(preloadedState) {
10-
const composeEnhancers = composeWithDevTools({ actionCreators });
10+
const composeEnhancers = composeWithDevTools({ actionCreators, trace: true, traceLimit: 25 });
1111
const store = createStore(reducer, preloadedState, composeEnhancers(
1212
applyMiddleware(invariant(), thunk)
1313
));

Diff for: examples/counter/webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var path = require('path');
22
var webpack = require('webpack');
33

44
module.exports = {
5-
devtool: 'cheap-module-eval-source-map',
5+
devtool: 'source-map',
66
entry: [
77
'webpack-hot-middleware/client',
88
'./index'

Diff for: examples/saga-counter/src/main.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import rootSaga from './sagas'
1313

1414

1515
const sagaMiddleware = createSagaMiddleware(/* {sagaMonitor} */)
16-
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
16+
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ &&
17+
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({ trace: true, traceLimit: 25 }) || compose;
1718
const store = createStore(
1819
reducer,
1920
composeEnhancers(applyMiddleware(sagaMiddleware))

Diff for: examples/saga-counter/webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var path = require('path')
22
var webpack = require('webpack')
33

44
module.exports = {
5-
devtool: 'cheap-module-eval-source-map',
5+
devtool: 'source-map',
66
entry: [
77
'webpack-hot-middleware/client',
88
path.join(__dirname, 'src', 'main')

Diff for: examples/todomvc/store/configureStore.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as actionCreators from '../actions';
44

55
export default function configureStore(preloadedState) {
66
const enhancer = window.__REDUX_DEVTOOLS_EXTENSION__ &&
7-
window.__REDUX_DEVTOOLS_EXTENSION__({ actionCreators, serialize: true });
7+
window.__REDUX_DEVTOOLS_EXTENSION__({ actionCreators, serialize: true, trace: true });
88
if (!enhancer) {
99
console.warn('Install Redux DevTools Extension to inspect the app state: ' +
1010
'https://github.com/zalmoxisus/redux-devtools-extension#installation')

Diff for: examples/todomvc/webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var path = require('path');
22
var webpack = require('webpack');
33

44
module.exports = {
5-
devtool: 'cheap-module-eval-source-map',
5+
devtool: 'source-map',
66
entry: [
77
'webpack-hot-middleware/client',
88
'./index'

0 commit comments

Comments
 (0)