This is a quick guide to adding environment variables to React apps, so let's get to it.
Create a file in your root folder and name it
Inside you .env create variable like this
Note: variables should start with
After you added
.env file and variables re-build your app with
npm start. Now you can use your environment variables by simply passing it inside your app