How to use the react-native-navigation.Navigation.setStackRoot function in react-native-navigation

To help you get started, we’ve selected a few react-native-navigation 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 hummingbird-me / kitsu-mobile / src / screens / Onboarding / common / FavoritesScreen.js View on Github external
onConfirm = () => {
    this.props.setScreenName('RatingSystemScreen');
    Navigation.setStackRoot(this.props.componentId, {
      component: {
        name: Screens.ONBOARDING_RATING_SYSTEM,
      },
    });
  };
github iotaledger / trinity-wallet / src / mobile / src / ui / components / BackPressGoToHome.js View on Github external
handleBackPress = () => {
            const { theme: { bar, body } } = this.props;

            Navigation.setStackRoot('appStack', {
                component: {
                    name: 'home',
                    options: {
                        animations: {
                            setStackRoot: {
                                enable: false,
                            },
                        },
                        layout: {
                            backgroundColor: body.bg,
                            orientation: ['portrait'],
                        },
                        topBar: {
                            visible: false,
                            drawBehind: true,
                            elevation: 0,
github forest-watcher / forest-watcher / app / components / home / index.js View on Github external
Navigation.setStackRoot(componentId, {
            component: {
              name: 'ForestWatcher.Dashboard'
            }
          });
        }
      } else if (actionsPending === 0) {
        setAppSynced(true);
      } else {
        syncApp();
        if (!this.syncModalOpen) {
          this.openModal();
        }
      }
    } else {
      Navigation.setStackRoot(componentId, {
        component: {
          name: 'ForestWatcher.Walkthrough'
        }
      });
    }
  }
github wix / react-native-navigation / playground / src / services / Navigation.js View on Github external
const setStackRoot = (selfOrCompId, root) => Navigation.setStackRoot(compId(selfOrCompId), root);
github hummingbird-me / kitsu-mobile / src / screens / Intro / IntroScreen.js View on Github external
navigateToRegistration = () => {
    Navigation.setStackRoot(this.props.componentId, {
      component: { name: Screens.AUTH_REGISTRATION },
    });
  }
github wix-playground / react-native-navigation-v1-v2-adapter / navigatorBridge.js View on Github external
resetTo(params) {
      Navigation.setStackRoot(this.id, layoutConverter.convertComponent(params));
    },
    handleDeepLink({ link, payload }){
github forest-watcher / forest-watcher / app / components / walkthrough / index.js View on Github external
goToLogin = debounceUI(() => {
    Navigation.setStackRoot(this.props.componentId, {
      component: {
        name: 'ForestWatcher.Login',
        passProps: {
          goBackDisabled: true
        },
        options: {
          topBar: {
            title: {
              text: i18n.t('commonText.setup')
            }
          }
        }
      }
    });
  });
github birkir / kvikmyndr-app / src / screens / menu / Menu.tsx View on Github external
onWeekPress() {
    this.hideMenu();
    this.setState({ selected: 0 });
    Navigation.setStackRoot('CENTER', {
      component: {
        name: WEEK,
      },
    });
  }
github iotaledger / trinity-wallet / src / mobile / src / libs / navigation.js View on Github external
() =>
                Navigation.setStackRoot('appStack', {
                    component: {
                        name: nextScreen,
                        id: nextScreen,
                        options: merge({}, options, getDefaultOptions(nextScreen)),
                    },
                }),
            delay,
github raindropio / mobile / src / modules / navigation / index.js View on Github external
setStackRoot(name, props) {
        //fix for RNN, it ignore global settings on iOS
        const { animations } = baseStyle()

        if (Array.isArray(props))
            props[0].component.options = {
                ...props[0].component.options||{},
                animations 
            }
        else
            props.component.options = {
                ...props.component.options||{},
                animations
            }
        
        return Navigation.setStackRoot(name, props)
    },