diff --git a/src/devTools.js b/src/devTools.js index 238d5067..0ba40b30 100644 --- a/src/devTools.js +++ b/src/devTools.js @@ -5,8 +5,7 @@ const ActionTypes = { COMMIT: 'COMMIT', SWEEP: 'SWEEP', TOGGLE_ACTION: 'TOGGLE_ACTION', - JUMP_TO_STATE: 'JUMP_TO_STATE', - RECOMPUTE_STATES: 'RECOMPUTE_STATES' + JUMP_TO_STATE: 'JUMP_TO_STATE' }; const INIT_ACTION = { @@ -142,13 +141,6 @@ function liftReducer(reducer, monitorReducer, initialState) { stagedActions = [...stagedActions, liftedAction.action]; timestamps = [...timestamps, liftedAction.timestamp]; break; - case ActionTypes.RECOMPUTE_STATES: - stagedActions = liftedAction.stagedActions; - timestamps = liftedAction.timestamps; - committedState = liftedAction.committedState; - currentStateIndex = stagedActions.length - 1; - skippedActions = {}; - break; default: break; } @@ -241,13 +233,6 @@ export const ActionCreators = { }, jumpToState(index) { return { type: ActionTypes.JUMP_TO_STATE, index }; - }, - recomputeStates(committedState, stagedActions) { - return { - type: ActionTypes.RECOMPUTE_STATES, - committedState, - stagedActions - }; } }; diff --git a/test/devTools.spec.js b/test/devTools.spec.js index 0e5014ea..10bf33b9 100644 --- a/test/devTools.spec.js +++ b/test/devTools.spec.js @@ -143,25 +143,6 @@ describe('devTools', () => { expect(store.getState()).toBe(2); }); - it('should recompute', () => { - store.dispatch({ type: 'INCREMENT' }); - store.dispatch({ type: 'DECREMENT' }); - store.dispatch({ type: 'INCREMENT' }); - expect(store.getState()).toBe(1); - - let stagedActions = [...store.devToolsStore.getState().stagedActions]; - // replace DECREMENT with INCREMENT (stagedAction[0] is @@INIT) - stagedActions[2] = { type: 'INCREMENT' }; - const committedState = 10; - - devToolsStore.dispatch(ActionCreators.recomputeStates( - committedState, - stagedActions - )); - - expect(store.getState()).toBe(13); - }); - it('should replace the reducer', () => { store.dispatch({ type: 'INCREMENT' }); store.dispatch({ type: 'DECREMENT' });