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

117
Views
What is the architecture to track async http calls via react native and retry failed request?

I'm new to react native and notice the similarity with Javascript, event loop, async.

My app functionality is divided into 5 pages. One is home page, clicking on button takes to page 1. Page 1 has button, clicking on it takes user to page 2, and similarly for page 2 to page 3 and page 4 to page 5.

At each button click I am making a http POST request that uploads a text file. Fetch is inherently async so it happens in the background. This may pass or fail. If it does pass I want to record the status as pass. And if it fails then I want to record the status as failed and reattempt the upload, all this should happen without blocking the user from going into subsequent pages.

I am looking for a high level architecture to understand how to track async http calls via react native and retry failed request?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

First thing to say is, it really depends on your backend design whether the fetch really is async or not.

Eventually what holds true is, that you will have a delay for any answer, which is probably why you say it is inherently async?

Normally you can use async functions and await the answers in javascript and react or use a .then chain to wait for the resolution of your request. With that your user has to wait a second, but you can either in the background or visible for the user register the result.

If you want to use retry logic I recommend to take a look at axios and axios interceptors. With that you can check for certain error codes in the API response and call with the same request again or change the request if needed.

about 4 years ago · Juan Pablo Isaza Report
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!