title: ReferenceError: Can't find variable: crypto
body: <p>I was trying to connect firebase with React-Native project.Config file for firebase is</p>
  
  <p><strong>firebase.js</strong></p>
  
  <pre><code>import * as firebase from "firebase/app";
  import "firebase/firestore";
  
  const config = {
      apiKey: "A***********************0",
      authDomain: "gu***********************m",
      databaseURL: "ht*******************m",
      projectId: "g*****2",
      storageBucket: "g********om",
      messagingSenderId: "########",
      appId: "####################",
      measurementId: "****************"
  
  };
  
  
  firebase.initializeApp(config);
  export const db = firebase.firestore();
  </code></pre>
  
  <p><strong>Home.js</strong></p>
  
  <pre><code>import { db } from '../config/firebase';
  
  
  export default function Home() {
  
      var temp = {
          fruit: "apple",
          name: "banana"
      };
      db.collection('books').add(temp);
      console.log("after adding to db");
      var db1 = db.collection('books').get(temp);
      console.log("hello dude");
      console.log(db1);
      console.log("bye dude");
  
  }
  </code></pre>
  
  <p>After I burn the app in android, it shows red screen with error: </p>
  
  <pre><code>ReferenceError Can't find variable: crypto
  
  This error is located at:
      in Home (at App.js:7)
      in gullak (at renderApplication.js:45)
      in RCTView (at AppContainer.js:109)
      in RCTView (at AppContainer.js:135)
      in AppContainer (at renderApplication.js:39)
  </code></pre>
  
  <p>I am not able to add into firestore database. Is there something I am missing here? Please help me.Thanks in advance.</p>