Trying to get Documents from Cloud Firestore

#1

Hello everyone!

This is my first post, and I just got started using Expo with React Native. I’m creating a simple app that basically just gets some data inside a database. In this case I red that Cloud Firestore is the new deal for app developers, and I plan to extend and grow my app in the future, so this seemed like the best choice.

I’ve already set up user authentication, no problem whatsoever. Anyways, when I tried to get data from a document inside a collection, I ran into some problems… I have researched for weeks and tried to eject and install the “RNFirebase” package, but without luck. What is the easiest possible way to get document data from a collection inside Cloud Firestore in a Expo and React Native application, with or without ejecting.

Any input is appreciated!

Thanks in advance.

#2

Hello! If you give more details about this

I have researched for weeks and tried to eject and install the “RNFirebase” package, but without luck

We can try to help you out with that

#3

Sorry for the long waiting period. I tried to make a clean build from ExpoKit and did all as mentioned in the documentation. I did the initial installation using “react-native link react-native-firebase”, but it gives me the error,

“RNFirebase core module was not found natively on Android, ensure you have correctly added the RNFirebase and gradle dependencies to your ‘android/app/build.gradle’ file.”

I red through build.gradle, but all the necessary lines of code that are in the documentation are correctly applied to the file. I made a Sharecode document, so that you can see for yourself, https://codeshare.io/2KZDmP

Thanks in advance

#4

I don’t see anything obviously wrong with that file you shared, but more context around the error message would be useful. Did it show that error for a particular file? Where in the compilation process did it show that error?

closed #5

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.