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

160
Visualizações
Render fetching data after login - [React - Javascript]

I had a problem when I try to run my project the Drawer navigation invoked before I loged in How can I ascyn this operation by rendering data after the login. if someone have an idea please share it I'll be glad. here is my code bellow :

Drawer.js:

useLayoutEffect(() => {
        
       getCurrentUser()
       
    }, [props])

    const getCurrentUser = async() => {
  
      try {

              await  AsyncStorage.getItem("userName", (err, result) => {
                    setEmail(result)
                });
            await AuthService.getCurrentUser(email)
            .then(response => {
    
                setItems(response.data);...
           


    

App.js:

<PaperProvider>
          <NavigationContainer>
          
              <Drawer.Navigator
              initialRouteName="LoginScreen"
              screenOptions={{
                headerShown: false,
                headerTransparent:true
              }}
              drawerContent={props => <DrawerContent {...props} />}>....

The console error :

Request failed with status code 404 at node_modules\axios\lib\core\createError.js:16:14 in createError at node_modules\axios\lib\core\settle.js:17:22 in settle

about 4 years ago · Santiago Trujillo
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