docs: function createRoute(options, callback) {
        options = options || {};
  
        if (typeof options === 'string') options = { path: options };
  
        var parentRoute = _currentRoute;
  
        if (parentRoute) {
          warning(options.parentRoute == null || options.parentRoute === parentRoute, 'You should not use parentRoute with createRoute inside another route\'s child callback; it is ignored');
        } else {
          parentRoute = options.parentRoute;
        }
  
        var name = options.name;
        var path = options.path || name;
  
        if (path && !(options.isDefault || options.isNotFound)) {
          if (PathUtils.isAbsolute(path)) {
            if (parentRoute) {
              invariant(path === parentRoute.path || parentRoute.paramNames.length === 0, 'You cannot nest path "%s" inside "%s"; the parent requires URL parameters', path, parentRoute.path);
            }
          } else if (parentRoute) {
            // Relative paths extend their parent.
            path = PathUtils.join(parentRoute.path, path);
          } else {
            path = '/' + path;
          }
        } else {
          path = parentRoute ? parentRoute.path : '/';
        }
  
        if (options.isNotFound && !/\*$/.test(path)) path += '*'; // Auto-append * to the path of not found routes.
  
        var route = new Route(name, path, options.ignoreScrollBehavior, options.isDefault, options.isNotFound, options.onEnter, options.onLeave, options.handler);
  
        if (parentRoute) {
          if (route.isDefault) {
            invariant(parentRoute.defaultRoute == null, '%s may not have more than one default route', parentRoute);
  
            parentRoute.defaultRoute = route;
          } else if (route.isNotFound) {
            invariant(parentRoute.notFoundRoute == null, '%s may not have more than one not found route', parentRoute);
  
            parentRoute.notFoundRoute = route;
          }
  
          parentRoute.appendChild(route);
        }
  
        // Any routes created in the callback
        // use this route as their parent.
        if (typeof callback === 'function') {
          var currentRoute = _currentRoute;
          _currentRoute = route;
          callback.call(route, route);
          _currentRoute = currentRoute;
        }
  
        return route;
      }