Advice how to handle api calls

I’m making f7 react app. I need advice what is best practice to handle api calls.

Api has about 30 pages. I’m thinking to make calls in app.jsx component, then store it to the local storage.

I need advice, what is best practice to call 30 pages and pull some of data while keeping best optimization and performance.Should I use for loop, is that good for performance?Should I loop every page and store it in local storage or should I make a call for some page only when need.I’m ok with the code, I just need advice how to handle api calls, because I’m thinking of few possibilities and don’t know what is the best solution for optimizing.

For performance and optimisation, it is better to call API on demand, e.g. when you load some page you call and API for this. Calling api for 30 pages can be overload on start