title: How to use uuid from firebase in react js?
body: <p>I write code as you can see below in reactjs and used firebase for uuid.</p>
  
  <pre><code>  import React, { Component } from 'react';
      var firebase = require('firebase');
      var uuid = require('firebase');
        // Initialize Firebase
        var config = {
          apiKey: "PRIVATE",
          authDomain: "Private.firebaseapp.com",
          databaseURL: "https://Private.firebaseio.com",
          projectId: "Private",
          storageBucket: "Private.appspot.com",
          messagingSenderId: "Private"
        };
        firebase.initializeApp(config);
      export default class Usurvey extends Component {
        constructor(props){
          super(props);
  
          this.state = {
            **uid: uuid.v1(),**
            studentName: '',
            answers: {
              answer1 : '',
              answer2 : '',
              answer3 : ''
            },
            isSubmitted: false
          };
        }
        render(){
          var studentName;
          var questions;
  
          if (this.state.studentName === '' &amp;&amp; this.state.isSubmitted === false) {
          }
  
          return(
            &lt;div&gt;
            {studentName}
            -------------------------
            {questions}
            &lt;/div&gt;
          );
        }
      }
  </code></pre>
  
  <p>but after run, this page has shown 
  <strong>TypeError: uuid.v1 is not a function</strong></p>
  
  <blockquote>
    <p>24 |   uid: uuid.v1(),</p>
  </blockquote>
  
  <p>As you can see I used this function in my code but send me a problem.
  How can I solve this problem?</p>