I am trying to configure firebase for my react native app. I get the following error:
Attempted import error: '@firebase/app' does not contain a default export (imported as 'firebase').
I am using firebase SDK 8.2.3 and the following code to configure firebase in my app:
import firebase from 'firebase';
import '@firebase/auth';
import '@firebase/firestore';
const firebaseConfig = {
...
};
if (!firebase.apps.length) {
firebase.initializeApp(firebaseConfig);
}
export { firebase };
CodePudding user response:
You have to import firebase as below
import firebase from "firebase/app"
CodePudding user response:
bro just use this package
[https://rnfirebase.io/]
it is efficient and easy to use with all the use-case examples