Currently, I am able to retrieve a person's username and corresponding data object with just one fetch from firebase. Inside this data object, there is a property named "uploads," which contains an array of documentIDs representing posts uploaded by the user. My goal is to fetch all these documents, compile them into an array, and then send back the entire array to the page.
Here is the code I have written up until now: https://i.sstatic.net/OC74t.png
The issue I am facing is that the return statement on line 54 is executing before all elements of postIDs are looped through. As a result, an empty array is being returned to the component.
If you need more information, please let me know. Any assistance on this matter would be greatly appreciated. Thank you in advance!