Environmental Variable and React Native
<p>Folks, </p>

<p>I am looking through a <a href="https://firebase.googleblog.com/2016/01/the-beginners-guide-to-react-native-and_84.html" rel="nofollow">Firebase blog post</a>. </p>

<p>One of the items that I noticed is that they recommend (implicitly, at least) to hardcode the API keys directly into the project:</p>

<pre><code>// Initialize Firebase
const firebaseConfig = {
  apiKey: "&lt;your-api-key&gt;",
  authDomain: "&lt;your-auth-domain&gt;",
  databaseURL: "&lt;your-database-url&gt;",
  storageBucket: "&lt;your-storage-bucket&gt;",,
};
const firebaseApp = firebase.initializeApp(firebaseConfig);
</code></pre>

<p>I was wondering if there was any way to <strong>avoid</strong> having to hard-code the API keys. If I were to do this in my project, I wouldn't be able to share it on GitHub, for example. What's the equivalent, in React Native, of setting and then retrieving an environmental variable?</p>