title: Differences between creating a new class to using export const
body: <p>Setup:</p>
  
  <ul>
  <li>BabelJS (es2015, react, stage-1)</li>
  <li>Webpack</li>
  <li>React / redux</li>
  </ul>
  
  <p>New to CommonJS and ES6. I know the difference between an object instance and a static container of methods but I am not sure how they behave when separated to modules. So I wonder what are the differences between returning an instance (is this pattern valid at all?):</p>
  
  <pre><code>// StateParser.js
  
  class StateParser {
      constructor() {
       }
  
       method1() {
          ...
       }
  
  }
  
  export default new StateParser()
  </code></pre>
  
  <p>and exporting const methods:</p>
  
  <pre><code>// StateParser.js
  
  let state = {
  }
  
  export const method1 = () =&gt; { ... }
  </code></pre>
  
  <ol>
  <li>Method A: Would there be a new instance every time I import?</li>
  <li><p>Method B: Is one of the benefits the ability to use object destructuring:</p>
  
  <pre><code>import { method1 } from '../utils/StateParser.js';
  </code></pre>
  
  <p>and then use method1 as if it existed locally?</p></li>
  <li><p>Method A: Is one of the benefits the ability to initialize state in the constructor?</p></li>
  </ol>
  
  <p>So basically I am not sure when to use which for my utility classes and would appreciate your input.</p>