Something went wrong while fetching comments. Please try again.
@@ -41,13 +41,19 @@ During the build, `process.env.REACT_APP_NOT_SECRET_CODE` will be replaced with
@@ -41,13 +41,19 @@ During the build, `process.env.REACT_APP_NOT_SECRET_CODE` will be replaced with
When you load the app in the browser and inspect the `<input>`, you will see its value set to `abcdef`, and the bold text will show the environment provided when using `npm start`:
The above form is looking for a variable called `REACT_APP_NOT_SECRET_CODE` from the environment. In order to consume this value, we need to have it defined in the environment. This can be done using two ways: either in your shell or in a `.env` file. Both of these ways are described in the next few sections.
The above form is looking for a variable called `REACT_APP_NOT_SECRET_CODE` from the environment. In order to consume this value, we need to have it defined in the environment. This can be done using two ways: either in your shell or in a `.env` file. Both of these ways are described in the next few sections.