FirebaseExtended / reactfire

Hooks, Context Providers, and Components that make it easy to interact with Firebase.
https://firebaseopensource.com/projects/firebaseextended/reactfire/
MIT License
3.54k stars 405 forks source link

GeoPoint support? #391

Closed mdanics closed 3 years ago

mdanics commented 3 years ago

React: 17.02

Firebase: 8.6.8

ReactFire: 3.0-canary

Expected behavior

https://firebase.google.com/docs/reference/js/firebase.firestore.GeoPoint there is support for a GeoPoint in the actual sdk. I would expect to be able to

const firestore = useFirestore()

and then be able to get to the geopoint constructor by new firestore.GeoPoint() but it doesn't exist.

mdanics commented 3 years ago

It's possible by importing firebase like so:

import firebase from 'firebase/app';

const geoPoint = new firebase.firestore.GeoPoint(lat,lng)