title: Error: Firebase: No Firebase App '[DEFAULT]' has been created
body: <p>I have a React Native app that uses Firebase for various functions. It was working perfectly for 2 weeks until I got the below error. I haven't changed anything in the <code>App.js</code> so don't know why this issue would come across.</p>
  
  <blockquote>
    <p>[DEFAULT]: Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app/no-app).</p>
  </blockquote>
  
  <p>Here is my config code placed in my <code>App.js</code>:</p>
  
  <pre><code>const firebaseConfig = {
      apiKey: '&lt;api-key&gt;',
      authDomain: '&lt;app-name&gt;.firebaseapp.com',
      databaseURL: 'https://&lt;app-name&gt;.firebaseio.com',
      projectId: '&lt;project-id&gt;',
      storageBucket: '&lt;app-name&gt;.appspot.com',
      messagingSenderId: '&lt;messaging-sender-id&gt;',
      appId: '&lt;app-id&gt;'
  };
  firebase.initializeApp(firebaseConfig);
  </code></pre>
  
  <p>This code only runs if I comment out the firebase code like the below in one of my components:</p>
  
  <pre><code>const { currentUser } = firebase.auth();
  console.log(currentUser);
  </code></pre>
  
  <p>Here is my <code>console.log(firebase.app())</code>;</p>
  
  <p><a href="https://i.stack.imgur.com/xtyUZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xtyUZ.png" alt="enter image description here"></a></p>