title: React export constants
body: <p>I cant get why following approach doesn't work:</p>
  
  <p>constants.js</p>
  
  <pre><code>import { createConstants } from '../utils';
  
  export default createConstants(
      'LOGIN_REQUEST',
      'LOGIN_SUCCESS',
      'LOGIN_FAILURE',
      'LOGOUT',
      'FETCH_DATA_REQUEST',
      'RECEIVE_DATA'
  );
  </code></pre>
  
  <p>utils.js</p>
  
  <pre><code>import React from 'react';
  
  export function createConstants(...constants) {
      return constants.reduce((acc, constant) =&gt; {
          acc[constant] = constant;
          return acc;
      }, {});
  }
  </code></pre>
  
  <p>Next i want to import LOGIN_REQUEST for example as redux action.</p>
  
  <pre><code>import { LOGIN_REQUEST, LOGIN_SUCCESS, LOGIN_FAILURE, LOGOUT } from '../constants';
  </code></pre>
  
  <p>But i'm getting <code>undefined</code> each time for all imported constants.
  It works only when i'm defining like this:</p>
  
  <pre><code>export const LOGIN_REQUEST = 'LOGIN_REQUEST';
  </code></pre>
  
  <p>Maybe somebody has some ideas?</p>