Monday, December 25, 2023
HomeiOS Developmentfirebase - React Native IOS app can not discuss to firestore

firebase – React Native IOS app can not discuss to firestore


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:

Firestore database

After I login, I ran the code:

firestore().assortment("lulu").doc('take a look at').set({identify:"textual content"})

Then I’ve:

terminal

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.



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments