Skip to content

Commit

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

Fix facebook/create-react-app#2593

* Update README.md

* Update README.md

* Update README.md

* Update README.md
  • Loading branch information
viankakrisna authored and swengorschewski committed Oct 12, 2017
1 parent a851405 commit 6251642
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/react-scripts/template/README.md
Original file line number Diff line number Diff line change
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 6251642

Please sign in to comment.