geofirex
geofirex copied to clipboard
Why do we need to init?
I can't use this lib because of the init function. Init is global (on the index's file) and some large projects don't let you change this.
// Init GeoFireX
import * as geofirex from 'geofirex';
const geo = geofirex.init(firebase);
Why do we need to init?
cannot get past the init function within a Vue app. Any updates?
Same problem here´.
"export 'default' (imported as 'geofirex') was not found in 'geofirex'
I'm using geofirex in a VueJS project and this seems to work for me:
import firebase from 'firebase/app'
import 'firebase/firestore';
import * as geofirex from 'geofirex';
const firebaseConfig = {/* ... */}
firebase.initializeApp(firebaseConfig)
const geo = geofirex.init(firebase)
const db = firebase.firestore()
But :( I have to do this for each component I'm using geofirex in... I'm unable to import geo from another file.