title: Export of a class instance in Javascript
body: <p>I was looking at <a href="https://github.com/KilroggD/Todos-python/blob/master/client/src/stores/RegisterStore.js" rel="noreferrer">this</a> code where a class instance is exported in a little bit weird way.</p>
  
  <p>Providing a snipped. It is exported as follows:</p>
  
  <pre><code>    class RegisterStore {
      @observable success = false
      @observable failure = false
      @observable errors = {}
      ...
      }
  
  export default new RegisterStore()
  export { RegisterStore }
  </code></pre>
  
  <p>And it is imported as follows in index.js:</p>
  
  <pre><code>import registerStore from './stores/RegisterStore'
  ...
  const stores = {
  registerStore
  ...
  }
  </code></pre>
  
  <p>Why are there <strong>two exports</strong> at the end of the first code? Is <br>
  <code>export default new RegisterStore()</code> <strong>AND</strong> <br>
   <code>const NewRegisterStore = new RegisterStore(); export default NewRegisterStore</code> are <strong>equivalent</strong>? <br></p>