src/components/navigation-component.js
/**
   * Navigate to an internal 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.
   * @param {Object} [jsonPayload] - (optional) The JSON payload with props to send to the new
   * screen.
   * @return {Promise} A <code>Promise</code> which will resolve or reject upon attempting to
   * navigate to the new screen.
   */
Navigate to an internal screen.
@async
@instance
@param {string} screenName - The name of the screen to navigate to; these names
should be defined in the initial  AppNavigator setup.
@param {Object} [jsonPayload] - (optional) The JSON payload with props to send to the new
screen.
@return {Promise} A Promise which will resolve or reject upon attempting to
navigate to the new screen.
Navigate to an internal screen . @async @instance @param { string } screenName - The name of the screen to navigate to ; these names should be defined in the initial AppNavigator setup . @param { Object } [ jsonPayload ] - ( optional ) The JSON payload with props to send to the new screen . @return { Promise } A Promise which will resolve or reject upon attempting to navigate to the new screen .
navigateInternal (screenName, jsonPayload) {
    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().navigate({
      path: this.constructor.getAppNavigator().screens[screenName].getRegisteredRoute(),
      navigationBar: this.constructor.getAppNavigator().screens[screenName]._getLocalizedNavigationBar(jsonPayload),
      jsonPayload: JSON.stringify(jsonPayload || {})
    })
  }
navigateInternal ( screenName , jsonPayload ) { 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 ( ) . navigate ( { path : this . constructor . getAppNavigator ( ) . screens [ screenName ] . getRegisteredRoute ( ) , navigationBar : this . constructor . getAppNavigator ( ) . screens [ screenName ] . _getLocalizedNavigationBar ( jsonPayload ) , jsonPayload : JSON . stringify ( jsonPayload || { } ) } ) }
Navigate to an internal screen.
Navigate to an internal screen .