Skip to content

Commit

Permalink
[docs] revert removal of newlines from html (#6386)
Browse files Browse the repository at this point in the history
An unintended change was merged in #6062
  • Loading branch information
JBallin authored and ianschmitz committed Mar 9, 2019
1 parent c17e25b commit 6a034ba
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docusaurus/docs/adding-custom-environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:

<!-- prettier-ignore-start -->

```html
<div>
<small>You are running this application in <b>development</b> mode.</small>
<form><input type="hidden" value="abcdef" /></form>
<form>
<input type="hidden" value="abcdef" />
</form>
</div>
```

<!-- prettier-ignore-end -->

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.

Having access to the `NODE_ENV` is also useful for performing actions conditionally:
Expand Down

0 comments on commit 6a034ba

Please # to comment.