code:
const timeStamp = Math.floor(Date.now() / 1000);
const insertKey = "_" + timeStamp;
const contactsDbRef = firebase.app().database().ref('contacts/');
console.log(timeStamp+"/"+insertKey);
contactsDbRef
.child(insertKey)
.set({
name:name,
number: number,
email: email,
},
console.log("data added"),
(error) => {
if (error) {
console.log(error)
} else {
console.log("added successfully")
}
});
How do i store contact details of user in firebase in react native app?
It is console logging the data, however in the backend data is not reflecting