title: React-Native: "FirebaseError: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app/no-app)"
body: <p>I'm building a React Native app, currently trying to implement an authentication registration system through Firebase Auth. I've followed a guide/the docs on the website to setup the Firebase config file. I run the app, enter a email and password, when I click the signup button I'm given the follow error below:</p>
  
  <pre><code>FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app/no-app).
  </code></pre>
  
  <p>I've search on google for possible fixes yet nothing seems to work. I've initialized Firebase as per the docs/tutorials I've watched. Hopefully someone can shed some light on the matter. I'll include the config file code below, XXXX to replace my actual config info</p>
  
  <p><strong>firebase.js</strong></p>
  
  <pre><code>import * as firebase from 'firebase/app';
  import "firebase/auth";
  
  const firebaseConfig = {
    apiKey: "XXXX",
    authDomain: "XXXX",
    databaseURL: "XXXX",
    projectId: "XXXX",
    storageBucket: "XXXX",
    messagingSenderId: "XXXX",
    appId: "XXXX",
    measurementId: "XXXX"
  };
  
  firebase.initializeApp(firebaseConfig);
  </code></pre>
  
  <p><strong>api.js</strong></p>
  
  <pre><code>export function registerUser({email, password}) {
    firebase
      .auth()
      .createUserWithEmailAndPassword(email, password)
      .catch(function(error) {
        console.log(error);
      });
  };
  </code></pre>
  
  <p><strong>EDIT/ANSWER</strong></p>
  
  <p>As helped in the comments below, the correct way was to implement/import through React-Native-Firebase. Links are in the comments.</p>