-[Integrating with a Node Backend](#integrating-with-a-node-backend)
-[Deploying](#deploying)
-[Something Missing?](#something-missing)
...
...
@@ -89,7 +90,7 @@ Instead, it will copy all the configuration files and the transitive dependencie
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
We recognize that this is suboptimal, but it is currently required due to the way we hide the ESLint dependency. The ESLint team is already [working on a solution to this](https://github.com/eslint/eslint/issues/3458) so this may become unnecessary in a couple of months.
### Installing a Dependency
The generated project includes React and ReactDOM as dependencies. It also includes a set of scripts used by Create React App as a development dependency. You may install other dependencies (for example, React Router) with `npm`:
...
...
@@ -317,7 +317,7 @@ Now you are ready to use the imported React Bootstrap components within your com
Flow typing is currently [not supported out of the box](https://github.com/facebookincubator/create-react-app/issues/72) with the default `.flowconfig` generated by Flow. If you run it, you might get errors like this:
The above form is looking for a variable called `REACT_APP_SECRET_CODE` from the environment. In order to consume this
...
...
@@ -418,11 +421,12 @@ variable will be set for you automatically. When you load the app in the browser
its value set to `abcdef`, and the bold text will show the environment provided when using `npm start`:
```html
<h6>Hello, Admin!</h6>
<small>You are running this application in <strong>development</strong> mode.</small>
<form>
<inputtype="hidden"value="abcdef"/>
</form>
<div>
<small>You are running this application in <b>development</b> mode.</small>
<form>
<inputtype="hidden"value="abcdef"/>
</form>
</div>
```
Having access to the `NODE_ENV` is also useful for performing actions conditionally:
...
...
@@ -433,6 +437,10 @@ if (process.env.NODE_ENV !== 'production') {
}
```
### Integrating with a Node Backend
Check out [this tutorial](https://www.fullstackreact.com/articles/using-create-react-app-with-a-server/) for instructions on integrating an app with a Node backend running on another port, and using `fetch()` to access it. You can find the companion GitHub repository [here](https://github.com/fullstackreact/food-lookup-demo).