code: function() {
          if (this.state) {
            forEach(this.state.handlerInfos.slice().reverse(), function(handlerInfo) {
              var handler = handlerInfo.handler;
              callHook(handler, 'exit');
            });
          }
  
          this.state = new TransitionState();
          this.currentHandlerInfos = null;
        }
docs: Clears the current and target route handlers and triggers exit
  on each of them starting at the leaf and traversing up through
  its ancestors.