I am trying to get data from a firebase cloud firestore database in one line in a Text component in react native. Here is what I am trying to do:
...
<Text style={styles.name}>
{firebase.firestore().collection("users").doc(post.uid).get().name}
</Text>
...
This code is trying to place a value in a React Native Text component by fetching a document with id "post.uid" so that the document data is returned where the value "name" is called and returns a single string. I would appreciate any help on how to do this as I am not able to figure out the solution. Thank you in advance!