Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

151
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda