Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

155
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!