Async await not getting response back until after refresh
I want to use async await for data fetching from an API. I have a file where I have my API call methods and another where I want to render my data out into component. I am having a hard time understanding how async await works. When I first run the page and load the products page I get nothing as a response from the getAllProductsInCollection function until after I press refresh. I think this is because the rest of the code has executed before it has any actual responsefrom the API and once the API gets the data and I refresh then It has data to pass into the components.