How to use the react-native-navigation.Navigation.setRoot 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 oktadeveloper / okta-react-native-spring-boot-example / react-native-app / app / navigation / layouts.js View on Github external
icon: Images.chevronLeftIcon,
          color: Colors.snow,
          iconColor: Colors.snow
        },
        background: {
          color: Colors.background
        }
      },
      sideMenu: {
        left: {
          enabled: false
        }
      }
    })

    Navigation.setRoot(appStack)

    // handle app state and deep links
    AppState.addEventListener('change', handleAppStateChange)
    Linking.addEventListener('url', handleOpenURL)
  })
}
github RN-ONE / RNFrameWorkNew / app / scene / Main3.js View on Github external
text={"退出登录"} onPress={() => {
                    Navigation.setRoot({root: LoginComponent()}).then();
                }}/>
github wix / react-native-navigation / playground / src / screens / CustomDialog.js View on Github external
onCLickSetRoot() {
    Navigation.setRoot({
      root: {
        component: {
          name: 'navigation.playground.TextScreen'
        }
      }
    });
  }
github wix / react-native-navigation / playground / src / screens / WelcomeScreen.js View on Github external
onClickSwitchToSideMenus = () => {
    Navigation.setRoot({
      root: {
        sideMenu: {
          left: {
            component: {
              name: 'navigation.playground.SideMenuScreen',
              passProps: {
                side: 'left'
              }
            }
          },
          center: {
            bottomTabs: {
              children: [
                {
                  stack: {
                    id: 'tab1Stack',
github mattermost / mattermost-mobile / app / actions / navigation / index.js View on Github external
visible: true,
            title: {
                color: theme.sidebarHeaderTextColor,
                text: title,
            },
            backButton: {
                color: theme.sidebarHeaderTextColor,
                title: '',
            },
            background: {
                color: theme.sidebarHeaderBg,
            },
        },
    };

    Navigation.setRoot({
        root: {
            stack: {
                children: [{
                    component: {
                        name,
                        passProps,
                        options: merge(defaultOptions, options),
                    },
                }],
            },
        },
    });
}
github NordicMuseum / Nordic-Museum-Audio-Guide / v2 / src / index.js View on Github external
if (newVersion) {
    setAppVersion(currentAppVersion);
  }

  const { setLocale, setRTL } = setI18nConfig(locale);
  const store = configureStore({
    device: { locale: setLocale, isRTL: setRTL, appVersion, museumMode },
  });

  audioActor(store);
  chargingActor(store);
  beaconActor(store);

  registerScreens(store);

  await Navigation.setRoot({
    root: {
      bottomTabs: {
        options: {
          bottomTabs: {
            backgroundColor: OFF_BLACK,
            currentTabIndex: 1,
          },
        },
        children: [
          {
            stack: {
              children: [
                {
                  component: {
                    name: 'nearMe',
                  },
github RN-ONE / RNFrameWorkNew / app / scene / Login.js View on Github external
goToHome() {
        Navigation.setRoot({root: AppTableHome()}).then();
    }
}
github wix / react-native-navigation / playground / src / screens / ComplexLayout.js View on Github external
onSideMenuLayoutInsideBottomTabPressed = () => {
    Navigation.dismissAllModals();
    Navigation.setRoot({
      root: {
        bottomTabs: {
          children: [
            {
              stack: {
                children: [
                  {
                    component: {
                      name: 'navigation.playground.TextScreen',
                      options: {
                        topBar: {
                          animate: false
                        }
                      }
                    }
                  }
github wix / react-native-crash-course / index.js View on Github external
Navigation.events().registerAppLaunchedListener(() => {
  Navigation.setRoot({
    root: {
      stack: {
        children: [
          {
            component: {
              name: 'blog.PostsList',
              options: {
                topBar: {
                  title: {
                    text: 'Blog'
                  }
                }
              }
            }
          }
        ],
github lomocoin / lomo-rn-boilerplate / src / containers / index.ts View on Github external
function setRootToHomeTab() {
  Navigation.setRoot({
    root: {
      bottomTabs: {
        children: [
          {
            stack: {
              children: [
                {
                  component: {
                    name: PROFILE,
                    passProps: {},
                  },
                },
              ],
              options: {
                bottomTab: {
                  text: i18n.t('menu_tabbar_user'),