From 23d2e08071d7fb6ccd4fc86e935ecfd4c09d2dba Mon Sep 17 00:00:00 2001 From: sven3270350 Date: Thu, 13 Jul 2017 02:49:43 +0700 Subject: [PATCH] Docs for react-router v4 basename feature (#2668) * Docs for react-router v4 basename feature Fix https://github.com/facebookincubator/create-react-app/issues/2593 * Update README.md * Update README.md * Update README.md * Update README.md --- packages/react-scripts/template/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index 6df4d43..0783e87 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -1776,6 +1776,15 @@ To override this, specify the `homepage` in your `package.json`, for example: This will let Create React App correctly infer the root path to use in the generated HTML file. +**Note**: If you are using `react-router@^4`, you can root ``s using the `basename` prop on any ``.
+More information [here](https://reacttraining.com/react-router/web/api/BrowserRouter/basename-string).
+
+For example: +```js + + // renders +``` + #### Serving the Same Build from Different Paths >Note: this feature is available with `react-scripts@0.9.0` and higher.