export default function createDevToolsStore(onDispatch) {
  const initialState = {
    actionsById: {},
    computedStates: [],
    currentStateIndex: -1,
    monitorState: {},
    nextActionId: 0,
    skippedActionIds: [],
    stagedActionIds: []
  };
  let currentState = [];
  let listeners = [];
  let initiated = false;
  let instance;

  function getState(id) {
    if (id) return currentState[id] || initialState;
    if (instance) return currentState[instance] || initialState;
    return initialState;
  }

  function getInitialState() {
    return initialState;
  }

  function isSet() {
    return initiated;
  }

  function update() {
    listeners.forEach(listener => listener());
  }

  function setState(state, id, onChanged) {
    const isNew = !currentState[id];
    if (isNew && onChanged) onChanged();
    currentState[id] = state;
    update();
    initiated = true;
  }

  function setInstance(id, toUpdate) {
    instance = id;
    if (toUpdate && instance && instance !== 'auto') update();
  }

  function deleteInstance(id) {
    delete currentState[id];
    instance = Object.keys(currentState)[0];
    update();
  }

  function dispatch(action) {
    if (action.type[0] !== '@') {
      if (action.type === 'JUMP_TO_STATE') {
        let state = getState();
        onDispatch(action, instance, state.computedStates[action.index].state);
        setState({ ...state, currentStateIndex: action.index }, instance);
      } else onDispatch(action, instance);
    }
    return action;
  }

  function subscribe(listener) {
    listeners.push(listener);

    return function unsubscribe() {
      const index = listeners.indexOf(listener);
      listeners.splice(index, 1);
    };
  }

  return {
    dispatch,
    getState,
    subscribe,
    liftedStore: {
      dispatch,
      getInitialState,
      getState,
      setState,
      setInstance,
      deleteInstance,
      subscribe,
      isSet
    }
  };
}

@@ -1170,44 +1170,8 @@
 ) %7B%0A
-    if (action.type%5B0%5D !== '@') %7B%0A  
     
@@ -1205,26 +1205,24 @@
 O_STATE') %7B%0A
-  
       let st
@@ -1245,18 +1245,16 @@
 ;%0A      
-  
 onDispat
@@ -1319,26 +1319,24 @@
 ate);%0A      
-  
 setState(%7B .
@@ -1386,26 +1386,24 @@
  instance);%0A
-  
     %7D else o
@@ -1431,22 +1431,16 @@
 tance);%0A
-    %7D%0A
     retu

Allow monitors actions