title: Use npm uuid in reactjs
body: <p>I have a place wherein I am required to use npm uuid package for generating unique Id's. After installing uuid package, the usage is as follows: </p>
  
  <pre><code>const uuid = require('uuid/v1');
  uuid();
  </code></pre>
  
  <p>But I have error which says:</p>
  
  <pre><code>[eslint] Unexpected require(). (global-require)
  </code></pre>
  
  <p>My function is as below: </p>
  
  <pre><code>someFunction = (i, event) =&gt; {
     if(someCondition) {
         //generate some unique id
         const uuid1 = require('uuid/v1');
         uuid1();
         //call some function and pass this id
         someFunction2(uuid1);
      } else{ 
        //generate some unique id
         const uuid2 = require('uuid/v1');
         uuid2();
         //call some function and pass this id
         someFunction2(uuid2);
      }
  </code></pre>
  
  <p>What is the best way to use require in ReactJs.</p>