title: Exporting/importing utility functions between React ES6 components in React-Rails app
body: <p>I want to create a utils.js that contains all of my utility functions, which are used by many of my React components.</p>
  
  <p>I try to export and import a Utilities class into my React component like this:</p>
  
  <pre><code>// utils. js
  export default class Utilities; 
  
  
  // myComponent.es6.jsx
  import someFunction from 'Utilities';
  </code></pre>
  
  <p>I receive errors like these:</p>
  
  <pre><code>Uncaught ReferenceError: require is not defined(anonymous function)
  Uncaught ReferenceError: exports is not defined
  </code></pre>
  
  <p>How do I set up a separate utilities page that can then be imported into my React components?</p>
  
  <p>I'm baffled -- thanks for any help you can provide!</p>