Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

156
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda