Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update README.md
  • Loading branch information
Timer authored Jul 12, 2017
commit 4600daea9abacbf78f21e82633b7ab1226353222
8 changes: 3 additions & 5 deletions packages/react-scripts/template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1784,15 +1784,13 @@ 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.

If you are using react-router v4 for your client side routing, it supports `basename` config in the `BrowserRouter`. For example:

```js
>Note: If you are using `react-router@^4`, you can root `<Link>`s using the `basename` prop on any `<Router>`. See more information [here](https://reacttraining.com/react-router/web/api/BrowserRouter/basename-string).
>For example:
>```js
<BrowserRouter basename="/calendar"/>
<Link to="/today"/> // renders <a href="/calendar/today">
```

So, all the `Link` component inside your app will navigate properly. Learn more [here](https://reacttraining.com/react-router/web/api/BrowserRouter/basename-string)

#### Serving the Same Build from Different Paths

>Note: this feature is available with `[email protected]` and higher.
Expand Down