You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Referencing Environment Variables in the HTML](#referencing-environment-variables-in-the-html)
39
40
-[Adding Temporary Environment Variables In Your Shell](#adding-temporary-environment-variables-in-your-shell)
@@ -804,6 +805,26 @@ In the future we plan to integrate it into Create React App even more closely.
804
805
805
806
To learn more about Flow, check out [its documentation](https://flowtype.org/).
806
807
808
+
## Adding a Router
809
+
810
+
Create React App doesn't prescribe a specific routing solution, but [React Router](https://reacttraining.com/react-router/) is the most popular one.
811
+
812
+
To add it, run:
813
+
814
+
```sh
815
+
npm install --save react-router react-router-dom
816
+
```
817
+
818
+
Alternatively you may use `yarn`:
819
+
820
+
```sh
821
+
yarn add react-router react-router-dom
822
+
```
823
+
824
+
To try it, delete all the code in `src/App.js` and replace it with any of the examples on its website. The [Basic Example](https://reacttraining.com/react-router/web/example/basic) is a good place to get started.
825
+
826
+
Note that [you may need to configure your production server to support client-side routing](#serving-apps-with-client-side-routing) before deploying your app.
827
+
807
828
## Adding Custom Environment Variables
808
829
809
830
>Note: this feature is available with `[email protected]` and higher.
0 commit comments