Saturday, November 21, 2026
HomeiOS Developmentandroid - Tips on how to fetch API knowledge through the launch...

android – Tips on how to fetch API knowledge through the launch display?

[ad_1]

I’ve react native app utilizing the default template which incorporates the default launch display. In launch mode, the launch display solely confirmed for a fraction of a second so I added the beneath (to AppDelegate) to drive it to pause for two seconds.

[NSThread sleepForTimeInterval:2.000];

My query is: is there a technique to name my api to load knowledge throughout this pause time?

Presently after the launch display my predominant app display hundreds which calls an API on mount and shows the information. It will be best if I might pre-fetch the information to keep away from the wait time after the primary app display hundreds.

That is the way in which I name my api on mount of the app:

  useEffect(() => {

    (async operate (){

         const response = await fetch('https://myapi...');
         ...
         ...

    })();

  }, []);

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments