From c48d0c252512aa780f271f2a272d544dbdc7126d 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 6df4d43d7f6..0783e878eea 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.