Commit a7e71442 authored by Ade Viankakrisna Fadlil's avatar Ade Viankakrisna Fadlil Committed by Joe Haddad
Browse files

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
parent 36904959
Showing with 9 additions and 0 deletions
+9 -0
...@@ -1776,6 +1776,15 @@ To override this, specify the `homepage` in your `package.json`, for example: ...@@ -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. 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 `<Link>`s using the `basename` prop on any `<Router>`.<br>
More information [here](https://reacttraining.com/react-router/web/api/BrowserRouter/basename-string).<br>
<br>
For example:
```js
<BrowserRouter basename="/calendar"/>
<Link to="/today"/> // renders <a href="/calendar/today">
```
#### Serving the Same Build from Different Paths #### Serving the Same Build from Different Paths
>Note: this feature is available with `react-scripts@0.9.0` and higher. >Note: this feature is available with `react-scripts@0.9.0` and higher.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment