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

118
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
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