React create constants file
<p>How to create constants file like: key - value in ReactJs,</p>

<pre><code>ACTION_INVALID = "This action is invalid!"
</code></pre>

<p>and to use that in other components</p>

<pre><code>errorMsg = myConstClass.ACTION_INVALID;
</code></pre>