Here my config file
**databse/firebaseDb.js**
import firebase from '@firebase/app';
import firestore from '@firebase/firestore';
import "@firebase/database";
var firebaseConfig = {
apiKey: "AIzaSyBILojF4bmQ3DzX6PmhKghch16KpZNKjSo",
authDomain: "newdemo-cf857.firebaseapp.com",
projectId: "newdemo-cf857",
storageBucket: "newdemo-cf857.appspot.com",
messagingSenderId: "513964251080",
appId: "1:513964251080:web:5f09f5fde2e7d5004152fd",
measurementId: "G-WKW4XC0PCR"
};
firebase.initializeApp(firebaseConfig);
export default firebase;
Here the App.js
import React, { Component } from 'react';
import {StyleSheet,Text,View,TextInput,Button,TouchableHighlight,} from 'react-native';
import firestore from '@react-native-firebase/firestore';
import firebase from './database/firebaseDb';
import "@firebase/database";
export default class App extends Component {
storeData(){
console.log("Level started")
firebase.firestore()
.collection('Users')
.add({
name: 'Ada Lovelace',
age: 30,
})
.then(() => {
console.log('User added!');
});
}
render(){
return(
)
}
}
Expected: I want to write data to firestore.

Replies
Know the answer? Post it — somebody with the same question will find it here.