//...store logic // profiler for redux actions const userTiming = (store) => (next) => (action) => { if (performance.mark === undefined) return next(action) performance.mark(`${action.type}_start`); const result = next(action); performance.mark(`${action.type}_end`); performance.measure(`${action.type}`,`${action.type}_start`,`${action.type}_end`,) return result } // add to middleware let middleware = [thunk] if (__DEV__) middleware.push(userTiming)