How to use the react-native-router-flux.Actions.currentScene function in react-native-router-flux

To help you get started, we’ve selected a few react-native-router-flux examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github HenryQuan / WoWs-Info-Re / WoWsInfo / src / component / common / FloatingButton.js View on Github external
navigate() {
    const { menu } = this.state;
    if (menu) {
      // Pop to menu 
      Actions.popTo('Menu');
    } else if (Actions.currentScene !== 'Menu') {
      // Add guard so that it wont push twice]
      Actions.Menu();
    }
  }
}
github aksonov / react-native-router-flux / examples / react-native / components / CustomNavBar.js View on Github external
_renderLeft() {
    if (Actions.currentScene === 'customNavBar1') {
      return (
         console.log('Hamburger button pressed')} style={[styles.navBarItem, { paddingLeft: 10 }]}>
          <img style="{{">
        
      );
    }
    return (
      
        <img style="{{">
      
    );
  }
github EdgeApp / edge-react-gui / src / components / scenes / PluginViewListScene.js View on Github external
launchModal(modal).then(response => {
        if (response) {
          plugin.sourceFile = { uri: response }
        }
        const key = Actions.currentScene === SPEND ? PLUGIN_SPEND : PLUGIN_BUY
        console.log('pvs: key', key)
        Actions[key]({ plugin: plugin })
      })
      return
github EdgeApp / edge-react-gui / src / actions / CryptoExchangeActions.js View on Github external
export const exchangeTimerExpired = (swapInfo: GuiSwapInfo) => async (dispatch: Dispatch, getState: GetState) => {
  if (Actions.currentScene !== Constants.EXCHANGE_QUOTE_SCENE) return
  Actions[Constants.EXCHANGE_QUOTE_PROCESSING_SCENE]()

  try {
    swapInfo = await fetchSwapQuote(getState(), swapInfo.request)
    Actions[Constants.EXCHANGE_QUOTE_SCENE]({ swapInfo })
    dispatch({ type: 'UPDATE_SWAP_QUOTE', data: swapInfo })
  } catch (error) {
    Actions.popTo(Constants.EXCHANGE_SCENE)
    dispatch(processSwapQuoteError(error))
  }
}
github odota / mobile / app / containers / DotaKeepApp.js View on Github external
BackHandler.addEventListener('hardwareBackPress', () => {
            try {
                if (Actions.currentScene == 'home') {
                    BackHandler.exitApp();
                }
                return false;
            } catch (err) {
                return false;
            }
        });
    }
github EdgeApp / edge-react-gui / src / connectors / components / CryptoExchangeQuoteTimerConnector.js View on Github external
export const mapStateToProps = (state: State) => {
  const expiration = Actions.currentScene === Constants.EXCHANGE_SCENE ? state.cryptoExchange.quoteExpireDate : null
  return {
    expiration
  }
}
export const mapDispatchToProps = (dispatch: Dispatch) => ({
github EdgeApp / edge-react-gui / src / components / Main.ui.js View on Github external
isCurrentScene = (sceneKey: string) => {
    return Actions.currentScene === sceneKey
  }
github EdgeApp / edge-react-gui / src / components / Main.ui.js View on Github external
isCurrentScene = (sceneKey: string) => {
    return Actions.currentScene === sceneKey
  }
github ConnectyCube / connectycube-reactnative-samples / RNChat / src / components / CreateDialogScreen / CreateDialogInput.js View on Github external
toChat(dialog) {
    if (Actions.currentScene !== 'chat') {
      Actions.replace('chat', {
        dialog: dialog,
        title: dialog.name,
      });

      this.props.clearSelectedUser();
      this.props.clearSearchUsersList();
    }
  }
github EdgeApp / edge-react-gui / src / actions / ScenesActions.js View on Github external
export const openDrawer = () => (dispatch: Dispatch, getState: GetState) => {
  const state = getState()
  const selectedWallet = getSelectedWalletId(state)
  if (selectedWallet.length > 0 && Actions.currentScene !== 'DrawerOpen') {
    Actions.drawerOpen()
  }
}