changeRoute(route) {
    // If the route is null, it's likely the entry page since that won't have a state
    if (!route) {
      route = this.entry;
    // If the route doesn't exist and there is ISN'T a 404 handler
    } else if (!this.routes[route] && !this.routes['*']) {
      console.log(`Error: route ${route} doesn't exist`);
      route = this.entry;
      history.replaceState({route: route}, '', `${this.base}${route}`);
    // If the route doesn't exist but there IS a 404 function handler
    } else if (!this.routes[route]) {
      route = '*';
    }
    
    this.currState = `${this.base}${route}`;
    this.routes[route]();
  }
/**
   * Executes the function associated with the given route stored in the routes object.
   * @param {string} route the desired route to change to
   */
Executes the function associated with the given route stored in the routes object.
@param {string} route the desired route to change to
Executes the function associated with the given route stored in the routes object . @param { string } route the desired route to change to
changeRoute(route) {
    if (!route) {
      route = this.entry;
    } else if (!this.routes[route] && !this.routes['*']) {
      console.log(`Error: route ${route} doesn't exist`);
      route = this.entry;
      history.replaceState({route: route}, '', `${this.base}${route}`);
    } else if (!this.routes[route]) {
      route = '*';
    }
    this.currState = `${this.base}${route}`;
    this.routes[route]();
  }
changeRoute ( route ) { if ( ! route ) { route = this . entry ; } else if ( ! this . routes [ route ] && ! this . routes [ '*' ] ) { console . log ( ` ${ route } ` ) ; route = this . entry ; history . replaceState ( { route : route } , '' , ` ${ this . base } ${ route } ` ) ; } else if ( ! this . routes [ route ] ) { route = '*' ; } this . currState = ` ${ this . base } ${ route } ` ; this . routes [ route ] ( ) ; }
Executes the function associated with the given route stored in the routes object.
Executes the function associated with the given route stored in the routes object .
// If the route is null, it's likely the entry page since that won't have a state // If the route doesn't exist and there is ISN'T a 404 handler // If the route doesn't exist but there IS a 404 function handler