Firestore Geofirestore #4382
-
Please help me. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
react-native-firebase is based on firebase-android-sdk and firebase-ios-sdk for the two platforms respectively geofirestore is based on firebase-js-sdk, so will use a completely different mechanism to communicate with the firestore database in the cloud It is possible to use both at the same time, so it is possible to for it to work, but you may have data coherency issues if both are attempting to cache things and have slightly different data. Or it might work great. react-native-firebase attempts to mimic the firebase-js-sdk API so it looks familiar, even though it is using the native SDKs underneath things, so they will look almost completely compatible but you will need to treat each library as if they are completely separate in your app and not mix API calls between them I think, for things to work well. |
Beta Was this translation helpful? Give feedback.
-
I've tried to combine react-native-firebase with geofirestore-js but when searching for nearby users returns empty value.
The code above returns the value of 0. While in Cloud Firestore the users data is less than 1 km. |
Beta Was this translation helpful? Give feedback.
react-native-firebase is based on firebase-android-sdk and firebase-ios-sdk for the two platforms respectively
geofirestore is based on firebase-js-sdk, so will use a completely different mechanism to communicate with the firestore database in the cloud
It is possible to use both at the same time, so it is possible to for it to work, but you may have data coherency issues if both are attempting to cache things and have slightly different data. Or it might work great.
react-native-firebase attempts to mimic the firebase-js-sdk API so it looks familiar, even though it is using the native SDKs underneath things, so they will look almost completely compatible but you will need to treat each l…