docs: function dispatch(path, action) {
          Router.cancelPendingTransition();
  
          var prevPath = state.path;
          var isRefreshing = action == null;
  
          if (prevPath === path && !isRefreshing) {
            return;
          } // Nothing to do!
  
          // Record the scroll position as early as possible to
          // get it before browsers try update it automatically.
          if (prevPath && action === LocationActions.PUSH) Router.recordScrollPosition(prevPath);
  
          var match = Router.match(path);
  
          warning(match != null, 'No route matches path "%s". Make sure you have <Route path="%s"> somewhere in your routes', path, path);
  
          if (match == null) match = {};
  
          var prevRoutes = state.routes || [];
          var prevParams = state.params || {};
          var prevQuery = state.query || {};
  
          var nextRoutes = match.routes || [];
          var nextParams = match.params || {};
          var nextQuery = match.query || {};
  
          var fromRoutes, toRoutes;
          if (prevRoutes.length) {
            fromRoutes = prevRoutes.filter(function (route) {
              return !hasMatch(nextRoutes, route, prevParams, nextParams, prevQuery, nextQuery);
            });
  
            toRoutes = nextRoutes.filter(function (route) {
              return !hasMatch(prevRoutes, route, prevParams, nextParams, prevQuery, nextQuery);
            });
          } else {
            fromRoutes = [];
            toRoutes = nextRoutes;
          }
  
          var transition = new Transition(path, Router.replaceWith.bind(Router, path));
          pendingTransition = transition;
  
          var fromComponents = mountedComponents.slice(prevRoutes.length - fromRoutes.length);
  
          Transition.from(transition, fromRoutes, fromComponents, function (error) {
            if (error || transition.abortReason) return dispatchHandler.call(Router, error, transition); // No need to continue.
  
            Transition.to(transition, toRoutes, nextParams, nextQuery, function (error) {
              dispatchHandler.call(Router, error, transition, {
                path: path,
                action: action,
                pathname: match.pathname,
                routes: nextRoutes,
                params: nextParams,
                query: nextQuery
              });
            });
          });
        }