I used to be growing a react native ios app. Nonetheless, it appears there are some issues in connecting with firestore database. Under are my codes and a few screenshots.
export default perform Touchdown({navigation}) {
const consumer = async() => {firestore().assortment('lulu').doc('wwweee').get().then(documentSnapshot => {
console.log('Person exists: ', documentSnapshot.exists);})}
return (
<View model={{flex: 1, justifyContent: 'heart',backgroundColor:'white'}}>
<Button title="Login"
onPress={() => navigation.navigate("Login")}/>
</View>
)
}
The log did not print something. However I do have some information within the firestore cloud database:
After I login, I ran the code:
firestore().assortment("lulu").doc('take a look at').set({identify:"textual content"})
Then I’ve:
As soon as I modify a consumer to login, the info shall be gone. It appears the info save/retrieve with the consumer when logging in reasonably than international database. Although I ran the above code to save lots of doc ‘take a look at’ with identify “textual content”. The database nonetheless did not change in any respect.
I do not know the place is the issue. I adopted the directions when creating an APP in firestore step-by-step.