title: firebase.database () multiple instances
body: <p>I am using firebase realtime database and I was wondering which is a better pattern  regarding </p>
  
  <pre><code>firebase.database() 
  </code></pre>
  
  <p>is it considered bad practice to have multiple instances of this. Is it better if I  have a single instance of the database which is exported within the node app. Or is it basically the same thing to create a new instance for every single action creator file.</p>
  
  <pre><code>import * as firebase from 'firebase';
  
  firebase.initializeApp(config);
  export const provider = new firebase.auth.GoogleAuthProvider();
  export const auth = firebase.auth();
  export default firebase;
  </code></pre>
  
  <p>I have this approach for the firebase app instance and I am unsure if a similar pattern is required for the database instance as well. There weren't any specifications within the <a href="https://firebase.google.com/docs/reference/node/firebase.database" rel="nofollow noreferrer">firebase</a> docs.</p>