Page load first, await call later using PRISM

VPrasanth 51 Reputation points
2021-11-06T12:33:06.897+00:00

Am using Prism to implement MVVM and IOC. On every page, there are certain API calls to be performed to fetch and bind the data.
I used OnNavigatedTo to ensure that the page is loaded first, and then to perform API fetch using HttpClient, but it's not working.

It's taking time to navigate to the page as all Async/Await calls are being made from OnNavigatedTo.

What is the best approach to let the navigation happens first, and then trigger the page load/API calls in Xamarin Forms.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,293 questions
{count} votes