Skip to content

Commit

Permalink
Docs for react-router v4 basename feature (facebook#2668)
Browse files Browse the repository at this point in the history
* Docs for react-router v4 basename feature

Fix facebook#2593

* Update README.md

* Update README.md

* Update README.md

* Update README.md
  • Loading branch information
viankakrisna authored and JohnNilsson committed Sep 9, 2017
1 parent 5eb7c73 commit 494d96f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/react-scripts/template/README.md
Expand Up @@ -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 `<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
>Note: this feature is available with `react-scripts@0.9.0` and higher.
Expand Down

0 comments on commit 494d96f

Please sign in to comment.