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

149
Views
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
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!