src/components/navigation-component.js
/**
   * Go back to a specified screen.
   *
   * @async
   * @instance
   * @param {string} screenName - The name of the screen to navigate to; these names
   * should be defined in the initial {@link AppNavigator} setup.
   * @return {Promise} A <code>Promise</code> which will resolve or reject upon attempting to
   * go back to the specified screen.
   */
Go back to a specified screen.
@async
@instance
@param {string} screenName - The name of the screen to navigate to; these names
should be defined in the initial  AppNavigator setup.
@return {Promise} A Promise which will resolve or reject upon attempting to
go back to the specified screen.
Go back to a specified screen . @async @instance @param { string } screenName - The name of the screen to navigate to ; these names should be defined in the initial AppNavigator setup . @return { Promise } A Promise which will resolve or reject upon attempting to go back to the specified screen .
backTo (screenName) {
    if (!this.constructor.getAppNavigator()) {
      throw errors.invalidAppNavigator
    }
    if (!(this.constructor.getAppNavigator() instanceof AppNavigator)) {
      throw errors.invalidAppNavigator
    }
    if (!this.constructor.getAppNavigator().screens || Object.keys(this.constructor.getAppNavigator().screens).length < 1) {
      throw errors.noValidScreens
    }
    if (!screenName) {
      throw errors.noScreenName
    }
    if (!Object.keys(this.constructor.getAppNavigator().screens).includes(screenName)) {
      throw errors.invalidScreenName(screenName)
    }
    return EnNavigationApi.requests().back({
      path: this.constructor.getAppNavigator().screens[screenName].getRegisteredRoute()
    })
  }
backTo ( screenName ) { if ( ! this . constructor . getAppNavigator ( ) ) { throw errors . invalidAppNavigator } if ( ! ( this . constructor . getAppNavigator ( ) instanceof AppNavigator ) ) { throw errors . invalidAppNavigator } if ( ! this . constructor . getAppNavigator ( ) . screens || Object . keys ( this . constructor . getAppNavigator ( ) . screens ) . length < 1 ) { throw errors . noValidScreens } if ( ! screenName ) { throw errors . noScreenName } if ( ! Object . keys ( this . constructor . getAppNavigator ( ) . screens ) . includes ( screenName ) ) { throw errors . invalidScreenName ( screenName ) } return EnNavigationApi . requests ( ) . back ( { path : this . constructor . getAppNavigator ( ) . screens [ screenName ] . getRegisteredRoute ( ) } ) }
Go back to a specified screen.
Go back to a specified screen .