Answers for "firebase update realtime database"

PHP
2

add to firebase database

db.collection("cities").add({
    name: "Tokyo",
    country: "Japan"
})
.then(function(docRef) {
    console.log("Document written with ID: ", docRef.id);
})
.catch(function(error) {
    console.error("Error adding document: ", error);
});
Posted by: Guest on July-21-2020
1

javascript write to firebase

function writeUserData(userId, name, email, imageUrl) {
  firebase.database().ref('users/' + userId).set({
    username: name,
    email: email,
    profile_picture : imageUrl
  });
}
Posted by: Guest on August-25-2020
0

firebase update data

await firebase.database().ref().update(updates);
Posted by: Guest on October-09-2020
0

firebase update realtime database

<a href="#" >Add Data</a>
Posted by: Guest on December-22-2020

Code answers related to "firebase update realtime database"

Browse Popular Code Answers by Language