Answers for "how to firebase.database().ref push unique id in same unique id firebase"

0

how to firebase.database().ref push unique id in same unique id firebase

const ref = Firebase.database().ref(`/posts`);
ref.push({ title, categories, content, timestamp})
   .then((snapshot) => {
     ref.child(snapshot.key).update({"id": snapshot.key})
   });
Posted by: Guest on March-18-2021

Browse Popular Code Answers by Language