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

146
Vistas
Promise.all() works well in debug mode, but not working in release mode of react native project

I am developing a react native project for mobile applications. The app works fine in debug mode but doesn't work properly after I release the app with CLI. I think the API request part in Promise.all() inside the code below has an issue in release mode. If anyone has faced similar problems before, then please let me know a suitable solution.

useEffect(() => {
    getUserInfo('sdf').then(d => {
      const userId = 'sdf';
      Promise.all([
        fetchPortfolio(userId, 'coin'),
        fetchPortfolio(userId, 'idea'),
        getCryptoNews('stocks'),
      ])
        .then(values => {
          dispatch(setCryptoPortfolio(values[0].items ? values[0].items : []));
          dispatch(setIdeaPortfolio(values[1].items ? values[1].items : []));
          setNewsList(values[2].slice(0, 3));
          setLoading(false);
        })
        .catch(err => {
          console.log(err);
          setLoading(false);
        });
    });
}, []);

It executes the code inside .catch() block of the code in release mode. Thank you.

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