I need to push unique keys in reverse order, so first I used negative timeStamp as keys. But keys in firebase are string so it wont work. That's why I decided to use [9999999999999 - date.now()] as key in firebase and it works(rendered reversely). Is it safe to use this method? Why not?
firebase.database().ref('saved_phrases').child(firebase.auth().currentUser.uid).child([9999999999999-Date.now()]).set( "My Data" )
Aucun commentaire:
Enregistrer un commentaire