This seems to be a very bad thing I am about to ask .... But is there any way to select based on an array of facts ?
Example: I have a collection "User" and that user's Information, What I want to say is that inside User Information there is a Collection of Post and also the information of that Post.
Collection('user')->UidUser->InfoUser( Collection('Post')->UidPost->InfoPost, Name, ArrayFllower )
How can I paginate with Post with an ArrayFllower array?
If it is difficult to understand, let me go to the example again:
I am User A I have Follow User B and User C, I want to see the Post of User B and User C, what should I do? And I want to paginate with each time UserA (me) gets 3 Posts, then I scroll down to automatically paginate
Update for my Question....
I used 2 queries => select Array Follow eg: arrayFollow = [uidUserB, uidUserC]. Then I use for to loop the Uids to get their Posts, but why can I only get Array Follow and arrayPost can't?
getData = async () => {
const user = [];
const Post = [];
await Promise.all(
await firebase.firestore().collection('user').doc(Fire.shared.uid).onSnapshot(documentSnapshot => {
user.push(...documentSnapshot.data().Followings);
})
)
for (const Uid of user) {
await firebase.firestore().collection('user').doc(Uid).collection('Post').onSnapshot(querySnapshot => {
querySnapshot.forEach(element => {
Post.push({ data: element.data() });
});
})
}
this.setState({ dataPost: Post });
}

