codediodeio / geofirex

:globe_with_meridians: :round_pushpin: Geolocation Queries with Firestore & RxJS

Home Page:https://geo-test-c92e4.firebaseapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'geofirex' does not contain a default export in react

bhagwanbankar opened this issue · comments

when I am importing geofirex in MySample.js file in react project
import geofirex from 'geofirex';.
I am getting below error at compile time
Attempted import error: 'geofirex' does not contain a default export (imported as 'geofirex').

Dependencies:
"firebase": "^7.21.1",
"geofirex": "^0.1.0",
"ngeohash": "^0.6.3",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.3",
"rxjs": "^6.6.3",

Thanks

@bhagwanbankar

you can import the init function like this:

import { init } from 'geofirex';
const geo = init(firebase);

@tobzilla90
It worked for me.
Thanks.