title: Firebase App named '[DEFAULT]' already exists REACT
body: <p>I'm a beginner in React and at the moment I try to connect my first app to a Firebase database. </p>
  
  <p>I have two files for that. The first, is a config.js file where all the information about the database are stored, like this:</p>
  
  <pre><code>`export default {
      apiKey: "***",
      authDomain: "***",
      databaseURL: "***",
      projectId: "***",
      storageBucket: "***",
      messagingSenderId: "***"
    };`
  </code></pre>
  
  <p>And my other file, App.js:</p>
  
  <pre><code>`import React, { Component } from 'react';
  import './App.css';
  
  //Firebase
  import * as firebase from 'firebase';
  import config from 'firebase';
  
  
  class App extends Component {
  constructor () {
      super()
  
      this.state = { loading: true }
      firebase.initializeApp(config)
    }
  
    componentWillMount () {
      const capsRef = firebase.database().ref('Capsules')
  
      capsRef.on('value', snapshot =&gt; {
        this.setState({
          Capsules: snapshot.val(),
          loading: false
        })
      })
    }
  
    render () {
      if (this.state.loading) {
        return (
          &lt;p&gt;Je suis en train de charger.&lt;/p&gt;
        )
      }
  
      const capsRef = Object.keys(this.state.tweets).map(key =&gt; {
        return &lt;p key={key}&gt;{this.state.Capsules[key].designation}&lt;/p&gt;
      })
  
      return (
        &lt;div&gt;
  
  
          &lt;h1&gt;Test&lt;/h1&gt;
  
        &lt;/div&gt;
  
      )
    }
  }
  
  export default App;`
  </code></pre>
  
  <p>So, when I refresh my browser, I have an error message : "Firebase: Firebase App named '[DEFAULT]' already exists (app/duplicate-app)." </p>
  
  <p>Can anyone help me ? 
  It's been a week now that I'm looking for a solution by myself.</p>