简体   繁体   English

React-Native Real-Time Firebase 如何找到所有子组件(所有引用)?

[英]React-Native Real-Time Firebase How to find all child components(all references)?

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.我想输入一个数据库链接并获取所有引用。在 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 https://firebase.google.com/docs/reference/node/firebase.database.DataSnapshot

THANKS FOR ALL THE HELP <3感谢所有帮助 <3 在此处输入图像描述

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.我给 ref 写了“/”,我得到了所有的东西。

 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 ); });

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将电话号码与 firebase 实时数据库中的电话号码匹配(react-native) - How to match phone number with the phone number present in firebase real-time database (react-native) 如何将 DropdownButtonFormField 值保存到 Firebase 实时数据库? - How to save DropdownButtonFormField value to Firebase real-time database? 如何在 React Native 应用程序上显示 firebase 存储中的所有图像? - How to display all images from firebase storage on React Native app? 如何在本机反应中显示所有传递的通知? Firebase - How to display all delivered notifications in react native? Firebase 如何保护 Firebase 实时数据库 Rest API? - How can I secure Firebase Real-Time Database Rest API? Firebase 是 react-native 后端 - Firebase are react-native backend Firebase 实时数据库和存储问题 Python - Firebase Real-Time Data Base & Storage Problem Python 如何将数据写入实时数据库 firebase flutter? - how do i write the data to Real-time Database firebase flutter? React-native 与 Firebase FCM 不工作 - React-native with Firebase FCM not working Firebase:如何获取所有子节点的列表? - Firebase: How to get a list of all child nodes?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM