Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

159
Visualizações
How can we use (or alternate method of) switchNavigator v4 (React Navigation) in the latest version React Navigation v6?

I have been using React navigation v4 since I am coding in react native. Recently I switched to v6 in a new project, when I needed to setup switchNavigation as I have in v4, I found there was no proper documentation on their site. I tried few ways but it couldn't get me to the desired result. Did anyone of you guys has their setup in v6 of switchNavigation? If so, do share and help me out.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Use async storage , Context APIenter code here

  <NavigationContainer theme={MyTheme}>
    <Stack.Navigator
      screenOptions={{
        headerShown: false,
        presentation: 'card',
      }}
      initialRouteName="Landing" //TODO: change to Landing or comment it ;)
    // detachInactiveScreens={true}
    >
      {props.shared.isloginHost == null ? (
        <>
          <Stack.Screen name="Landing" component={Landing} />
          <Stack.Screen name="SignIn" component={SignIn} />
          <Stack.Screen name="SignUp" component={SignUp} />
          <Stack.Screen name="SignUpDetails" component={SignUpDetails} />
          <Stack.Screen name="ForgotPassword" component={ForgotPassword} />
          <Stack.Screen name="OTPPassword" component={OTPPassword} />
          <Stack.Screen name="ChangePassword" component={ChangePassword} />
          <Stack.Screen
            name="GuestBottomTab"
            component={GuestBottomTabs}
          />
        </>
      ) : (
        <>
          {props.shared.isloginHost == false ? (
            <Stack.Screen
              name="GuestBottomTabs"
              component={GuestBottomTabs}
            />
          ) : (
            <>
              {props.shared.hostplan == null ? (
                <Stack.Screen name="Insight" component={Insight} />
              ) : null}

              <Stack.Screen
                name="HostBottomTabs"
                component={HostBottomTabs}
              />
            </>
          )}
        </>
      )}

props.shared.isloginHost isloginHost is the state in the shared reducer when the state is null then user only access the Auth screen

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda