Im new to firebase, and im implementing a comment feature and i have this structure on the firestore:
- User
- UserID
- Name
- Picture
----------
- Post
- PostID
- Comments
- CommentID
- PostID
- UserID
I want to display the comments in each posts with the name and the picture of a user who commented. How can I do that? I have the userID of the commentor, is it possible to access the user User collection using that? Or is there something wrong with my database structure?
Im planning to include the name and the picture of the user inside the Comment collection but when the user updates their name and picture, how can i update the one on the Comment collection?