I want to get all child components without writing anything.
I want to get all all references in a database link.
I want to enter a database link and get all references.In react-native.
I tried those funtions in the link below but couldn't get them work. https://firebase.google.com/docs/reference/node/firebase.database.DataSnapshot
you can do like this:-
DatabaseReference myRef = FirebaseDatabase.getInstance().getReference().child("Frist Child").child("Second Child");
I wrote "/" to ref and I got all the things.
const firebaseMain = firebase.app().database('https://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/').ref('/'); console.log("CHILDREN:"); firebaseMain.ref.once('value', function(snapshot) { console.log(JSON.stringify(snapshot.val())); firebaseReferences=snapshot.val(); console.log("\x1b[32m","references: --> TYPE"+typeof firebaseReferences ); });
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.