From cf39747c775c6e5b3e673fc008ac15ac8f1f4092 Mon Sep 17 00:00:00 2001 From: Ade Viankakrisna Fadlil 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 48c396ed56a..b68949bb484 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -1772,6 +1772,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.