Firebase React Native -- how to grab and transmit Device ID/Token? : <p>First time Firebase and RN user here, trying to figure out how to transmit the Device ID/Token of the app user. </p>

<p>I'm using something basic like this to transmit information to my firebase database right now (using <code>firebase.database().ref()</code>).</p>

<pre><code>  updateDB = (timestamp_key, item_name, item_url) =&gt; {
    firebase.database().ref(timestamp_key).set({
      item_name: item_name,
      item_url: item_url
    })
  }
</code></pre>

<p>I haven't been able to find a simple straightforward answer as to how to fetch one's device token and transmit that as well (so I know whose action is whose later).</p>

<p>Is there a (what I think should be) a relatively straightforward way to do that? Thanks!</p>

<p>P.S. I am calling this higher up in the script in addition to the configs to initialize the connection -- maybe it's somewhere around here I need to grab the device token?</p>

<pre><code>// Initialize Firebase
const firebaseConfig = {
  apiKey: "blah",
  authDomain: "blah",
  databaseURL: "blah",
  storageBucket: "blah",
  messagingSenderId: "blah"
};

firebase.initializeApp(firebaseConfig);
</code></pre>
